diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h index fb3d2c5082..175aeee4da 100644 --- a/src/lib/evas/Evas_Common.h +++ b/src/lib/evas/Evas_Common.h @@ -5827,1823 +5827,3 @@ typedef enum _Evas_3D_Mesh_File_Type { EVAS_3D_MESH_FILE_TYPE_MD2 = 0, /**< Quake's MD2 mesh file format */ } Evas_3D_Mesh_File_Type; - -/** - * Create a new scene object on the given Evas @p e canvas. - * - * @param e The given canvas. - * @return A new scene object. - * - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI Evas_3D_Scene *evas_3d_scene_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the root node of a scene. - * - * @param scene A scene. - * @param node A node which will be used as a root node for the scene. - * - * @see evas_3d_scene_root_node_set() - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI void evas_3d_scene_root_node_set(Evas_3D_Scene *scene, Evas_3D_Node *node) EINA_ARG_NONNULL(1); - -/** - * Get the root node of a scene. - * - * @param scene The given scene. - * @return The root node of the given scene. - * - * @see evas_3d_scene_root_node_get() - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI Evas_3D_Node *evas_3d_scene_root_node_get(const Evas_3D_Scene *scene) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the camera node of a scene. - * - * @param scene The given scene. - * @param node A node which will be used as a camera node for the scene. - * - * @see evas_3d_scene_camera_node_get() - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI void evas_3d_scene_camera_node_set(Evas_3D_Scene *scene, Evas_3D_Node *node) EINA_ARG_NONNULL(1); - -/** - * Get the camera node of a scene. - * - * @param scene The given scene. - * @return The camera node of the given scene. - * - * @see evas_3d_scene_camera_node_set() - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI Evas_3D_Node *evas_3d_scene_camera_node_get(const Evas_3D_Scene *scene) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the resolution of a scene. - * - * @param scene The given scene. - * @param w Width of the resolution. - * @param h Height of the resolution. - * - * A scene should be rendered to be displayed through an image objects. The - * resolution defines size of the internal surface holding the rendered result. - * - * @see evas_3d_scene_size_get() - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI void evas_3d_scene_size_set(Evas_3D_Scene *scene, int w, int h) EINA_ARG_NONNULL(1); - -/** - * Get the internal resolution of a scene. - * - * @param scene The given scene. - * @param w Pointer to receive width of the resolution. - * @param h Pointer to receive height of the resolution. - * - * @see evas_3d_scene_size_set() - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI void evas_3d_scene_size_get(const Evas_3D_Scene *scene, int *w, int *h) EINA_ARG_NONNULL(1); - -/** - * Set the background color of a scene. - * - * @param scene The given scene. - * @param r Red component of the background color. - * @param g Green component of the background color. - * @param b Blue component of the background color. - * @param a Alpha component of the background color. - * - * Background color defines initial color of pixels before a scene is rendered. - * If you want to display a scene with background evas objects are still - * remaining as if it was the background, set the alpha term to 0.0. - * - * Default background color is (0.0, 0.0, 0.0, 0.0). - * - * @see evas_3d_scene_background_color_get() - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI void evas_3d_scene_background_color_set(Evas_3D_Scene *scene, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) EINA_ARG_NONNULL(1); - -/** - * Get the background color of a scene. - * - * @param scene The given scene. - * @param r Pointer to receive red component of the background color. - * @param g Pointer to receive green component of the background color. - * @param b Pointer to receive blue component of the background color. - * @param a Pointer to receive alpha component of the background color. - * - * @see evas_3d_scene_background_color_set() - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI void evas_3d_scene_background_color_get(const Evas_3D_Scene *scene, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) EINA_ARG_NONNULL(1); - -/** - * Get information on the most front visible mesh for the given position. - * - * @param scene The given scene. - * @param x X coordinate of the picking position. - * @param y Y coordinate of the picking position. - * @param node Pointer to receive the node contains the picked mesh. - * @param mesh Pointer to receive the picked mesh. - * @param s Pointer to receive the texture "s" coordinate. - * @param t Pointer to receive the texture "t" coordinate. - * - * (x, y) is the screen coordinate of the given scene. That is, left-top is - * (0, 0) and right-bottom is (w, h) where (w, h) is the size of the scene. - * The texture coordinate may be useful when using proxy texture source. - * - * @since 1.10 - * - * @ingroup Evas_3D_Scene - */ -EAPI Eina_Bool evas_3d_scene_pick(const Evas_3D_Scene *scene, Evas_Real x, Evas_Real y, Evas_3D_Node **node, Evas_3D_Mesh **mesh, Evas_Real *s, Evas_Real *t) EINA_ARG_NONNULL(1); - -/** - * Create a new node on the given Evas @p canvas. - * - * @param e The given canvas. - * @param type The type of the node. - * @return The created node handle. - * - * @see evas_3d_node_del() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI Evas_3D_Node *evas_3d_node_add(Evas *e, Evas_3D_Node_Type type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Delete a node from its belonging Evas canvas. - * - * @param node The given node. - * - * @see evas_3d_node_add() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI void evas_3d_node_del(Evas_3D_Node *node) EINA_ARG_NONNULL(1); - -/** - * Get the type of the given node. - * - * @param node The given node. - * @return The type of the given node. - * - * @see evas_3d_node_add() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI Evas_3D_Node_Type evas_3d_node_type_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Add a member node to the given node. - * - * @param node The given node which will be the parent. - * @param member Node object to be added. - * - * Nodes can be constructed into N-ary tree structure like other ordinary scene - * graph. Basically a node inherit transforms from its parent. - * - * @see evas_3d_node_parent_get() - * @see evas_3d_node_member_del() - * @see evas_3d_node_member_list_get() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI void evas_3d_node_member_add(Evas_3D_Node *node, Evas_3D_Node *member) EINA_ARG_NONNULL(1, 2); - -/** - * Delete a member node from the given node. - * - * @param node The given node. - * @param member Member node to be deleted from the given node. - * - * @see evas_3d_node_member_add() - * - * @ingroup Evas_3D_Node - */ -EAPI void evas_3d_node_member_del(Evas_3D_Node *node, Evas_3D_Node *member) EINA_ARG_NONNULL(1, 2); - -/** - * Get the parent node of the given node. - * - * @param node The given node. - * @return The parent node of the given node. - * - * @see evas_3d_node_member_add() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI Evas_3D_Node *evas_3d_node_parent_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the list of member nodes of the given node. - * - * @param node The given node. - * @return The list of member nodes if any or @c NULL if there are none. - * - * @see evas_3d_node_member_add() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI const Eina_List *evas_3d_node_member_list_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * @defgroup Evas_3D_Node_Transform - * @ingroup Evas_3D_Node - * - * Functions that manipulate node transforms. - * - * Evas_3D_Node does not provide standard 4x4 matrix to transform something. - * Instead, one can set position, orientation and scale of a node separately. - * A node will be first scaled and rotated and then translated according to its - * position, orientation and scale. Each transform attributes can be set to - * inherit from its parent or not. - */ - -/** - * Set the position of the given node. - * - * @param node The given node. - * @param x X coordinate of the position. - * @param y Y coordinate of the position. - * @param z Z coordinate of the position. - * - * According to the inheritance flag, (x, y, z) can be a world space position or - * parent space position. - * - * Default position is (0.0, 0.0, 0.0). - * - * @see evas_3d_node_position_inherit_set() - * @see evas_3d_node_position_get() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_position_set(Evas_3D_Node *node, Evas_Real x, Evas_Real y, Evas_Real z) EINA_ARG_NONNULL(1); - -/** - * Set the orientation of the given node using quaternion. - * - * @param node The given node. - * @param x X term of the orientation quaternion (w, x, y, z) - * @param y Y term of the orientation quaternion (w, x, y, z) - * @param z Z term of the orientation quaternion (w, x, y, z) - * @param w W term of the orientation quaternion (w, x, y, z) - * - * According the the inheritance flag, (w, x, y, z) can be a world space - * orientation or parent space orientation. - * - * Default orientation is (1.0, 0.0, 0.0, 0.0) (identity quaternion). - * - * @see evas_3d_node_orientation_inherit_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_orientation_set(Evas_3D_Node *node, Evas_Real x, Evas_Real y, Evas_Real z, Evas_Real w) EINA_ARG_NONNULL(1); - -/** - * Set the orientation of the given node using axis-angle. - * - * @param node The given node. - * @param angle Rotation angle. - * @param x X term of the rotation axis. - * @param y Y term of the rotation axis. - * @param z Z term of the rotation axis. - * - * @see evas_3d_node_orientation_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_orientation_angle_axis_set(Evas_3D_Node *node, Evas_Real angle, Evas_Real x, Evas_Real y, Evas_Real z) EINA_ARG_NONNULL(1); - -/** - * Set the scale of the given node. - * - * @param node The given node. - * @param x Scale factor along X-axis. - * @param y Scale factor along Y-axis. - * @param z Scale factor along Z-axis. - * - * According to the inheritance flag, (x, y, z) can be a world space scale or - * parent space scale. Be careful when using non-uniform scale factor with - * inheritance, each transform attributes are not affected by other attributes. - * - * Default scale is (1.0, 1.0, 1.0). - * - * @see evas_3d_node_scale_inherit_set() - * @see evas_3d_node_scale_get() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_scale_set(Evas_3D_Node *node, Evas_Real x, Evas_Real y, Evas_Real z) EINA_ARG_NONNULL(1); - -/** - * Get the position of the given node. - * - * @param node The given node. - * @param Space where the target position belongs to. - * @param x Pointer to receive X coordinate of the position. - * @param y Pointer to receive Y coordinate of the position. - * @param z Pointer to receive Z coordinate of the position. - * - * @see evas_3d_node_position_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_position_get(const Evas_3D_Node *node, Evas_3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z) EINA_ARG_NONNULL(1); - -/** - * Get the orientation of the given node as quaternion. - * - * @param node The given node. - * @param space Space where the target position belongs to. - * @param x Pointer to receive X term of the orientation quaternion. - * @param y Pointer to receive Y term of the orientation quaternion. - * @param z Pointer to receive Z term of the orientation quaternion. - * @param w Pointer to receive W term of the orientation quaternion. - * - * @see evas_3d_node_orientation_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_orientation_get(const Evas_3D_Node *node, Evas_3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z, Evas_Real *w) EINA_ARG_NONNULL(1); - -/** - * Get the scale of the given node - * - * @param node The given node. - * @param space Space where the target position belongs to. - * @param x Scale facator to receive along X-axis. - * @param x Scale facator to receive along Y-axis. - * @param x Scale facator to receive along Z-axis. - * - * @see evas_3d_node_scale_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_scale_get(const Evas_3D_Node *node, Evas_3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z) EINA_ARG_NONNULL(1); - -/** - * Set the position inheritance of the given node. - * - * @param node The given node. - * @param inherit Whether to inherit parent position @c EINA_TRUE or not - * @c EINA_FALSE. - * - * When inheritance is enabled, a node's world space position is determined by - * adding the parent node's world position and the node's position, otherwise, - * the node's position will be the world space position. - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_position_inherit_set(Evas_3D_Node *node, Eina_Bool inherit) EINA_ARG_NONNULL(1); - -/** - * Set the orientation inheritance of the given node. - * - * @param node The given node. - * @param inherit Whether to inherit parent orientation @c EINA_TRUE or not - * @c EINA_FALSE. - * - * When inheritance is enabled, a node's world space orientation is determined - * by multiplying the parent node's world orientation and the node's - * orientation, otherwise, the node's orientation will be the world space - * orientation. - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_orientation_inherit_set(Evas_3D_Node *node, Eina_Bool inherit) EINA_ARG_NONNULL(1); - -/** - * Set the scale inheritance of the given node. - * - * @param node The given node. - * @param inherit Whether to inherit parent scale @c EINA_TRUE or not - * @c EINA_FALSE. - * - * When inheritance is enabled, a node's world space scale is determined by - * multiplying the parent node's world scale and the node's scale, otherwise, - * the node's scale will be the world space scale. - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_scale_inherit_set(Evas_3D_Node *node, Eina_Bool inherit) EINA_ARG_NONNULL(1); - -/** - * Get the position inheritance of the given node. - * - * @param node The given node. - * @return @c EINA_TRUE if inheritance is enabled, or @c EINA_FALSE if not. - * - * @see evas_3d_node_position_inherit_set() - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI Eina_Bool evas_3d_node_position_inherit_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the orientation inheritance of the given node. - * - * @param node The given node. - * @return @c EINA_TRUE if inheritance is enabled, or @c EINA_FALSE if not. - * - * @see evas_3d_node_orientation_inherit_set() - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI Eina_Bool evas_3d_node_orientation_inherit_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the scale inheritance flag of the given node. - * - * @param node The given node. - * @return @c EINA_TRUE if inheritance is enabled, or @c EINA_FALSE if not. - * - * @see evas_3d_node_scale_inherit_set() - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI Eina_Bool evas_3d_node_scale_inherit_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Rotate the given node to look at desired position. - * - * @param node The given node. - * @param target_space Space where the target position belongs to. - * @param x X coordinate of the target position. - * @param y Y coordinate of the target position. - * @param z Z coordinate of the target position. - * @param up_space Space where the up vector belongs to. - * @param ux X term of the up vector. - * @param uy Y term of the up vector. - * @param uz Z term of the up vector. - * - * This function rotate the given node so that its forward vector (negative - * Z-axis) points to the desired position and the up vector coincide with the - * given up vector. - * - * @see evas_3d_node_orientation_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node_Transform - */ -EAPI void evas_3d_node_look_at_set(Evas_3D_Node *node, Evas_3D_Space target_space, Evas_Real x, Evas_Real y, Evas_Real z, Evas_3D_Space up_space, Evas_Real ux, Evas_Real uy, Evas_Real uz) EINA_ARG_NONNULL(1); - -/** - * Set a camera to the given node. - * - * @param node The given node. - * @param camera The camera to be set. - * - * @warning If the node type should be EVAS_3D_NODE_TYPE_CAMERA. Otherwise - * nothing will be happened. - * - * @see evas_3d_node_add() - * - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI void evas_3d_node_camera_set(Evas_3D_Node *node, Evas_3D_Camera *camera) EINA_ARG_NONNULL(1); - -/** - * Get the camera of the given node. - * - * @param node The given node. - * @return The camera of the given node if any, or @c NULL if there's none. - * - * @see evas_3d_node_camera_set() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI Evas_3D_Camera *evas_3d_node_camera_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the light of the given node. - * - * @param node The given node. - * @param light The light to be set. - * - * @warning If the node type should be EVAS_3D_NODE_TYPE_LIGHT. Otherwise - * nothing will be happened. - * - * @see evas_3d_node_add() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI void evas_3d_node_light_set(Evas_3D_Node *node, Evas_3D_Light *light) EINA_ARG_NONNULL(1); - -/** - * Get the light of the given node. - * - * @param node The given node. - * @return The light of the given node if any, or @c NULL if there's none. - * - * @see evas_3d_node_light_set() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI Evas_3D_Light *evas_3d_node_light_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Add a mesh to the given node. - * - * @param node The given node. - * @param mesh The mesh to be added. - * - * @warning If the node type should be EVAS_3D_NODE_TYPE_MESH. Otherwise - * nothing will be happened. - * - * @see evas_3d_node_add() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI void evas_3d_node_mesh_add(Evas_3D_Node *node, Evas_3D_Mesh *mesh) EINA_ARG_NONNULL(1); - -/** - * Delete a mesh from the given node. - * - * @param node The given node. - * @param mesh The mesh to be deleted. - * - * @warning If the node is not of type EVAS_3D_NODE_TYPE_MESH or the given mesh - * does not belong to the given node, nothing will be happened. - * - * @see evas_3d_node_mesh_add() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI void evas_3d_node_mesh_del(Evas_3D_Node *node, Evas_3D_Mesh *mesh) EINA_ARG_NONNULL(1); - -/** - * Get the list of meshes of the given node. - * - * @param node The given node. - * @return The list of meshes if any, or @c NULL if there're none. - * - * If there're no meshes in the given node, @c NULL will be returned. - * - * @warning If the node is not of type EVAS_3D_NODE_TYPE_MESH or the given mesh - * does not belong to the given node, @c NULL will be returned. - * - * @see evas_3d_node_mesh_add() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI const Eina_List *evas_3d_node_mesh_list_get(const Evas_3D_Node *node) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the animation frame number of the given node for the given mesh. - * - * @param node The given node. - * @param mesh The given mesh. - * @param frame The animation frame number. - * - * If the node is not of type EVAS_3D_NODE_TYPE_MESH or the given mesh does not - * belong to the given mesh error mesh will be generated and nothing happens. - * - * Default mesh frame is 0. - * - * @see evas_3d_node_mesh_add() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI void evas_3d_node_mesh_frame_set(Evas_3D_Node *node, Evas_3D_Mesh *mesh, int frame) EINA_ARG_NONNULL(1); - -/** - * Set the animation frame number of the given node for the given mesh. - * - * @param node The given node. - * @param mesh The given mesh. - * @param frame The animation frame number. - * - * If the node is not of type EVAS_3D_NODE_TYPE_MESH or the given mesh does not - * belong to the given mesh, nothing will be happened. - * - * @see evas_3d_node_mesh_add() - * @since 1.10 - * - * @ingroup Evas_3D_Node - */ -EAPI int evas_3d_node_mesh_frame_get(const Evas_3D_Node *node, Evas_3D_Mesh *mesh) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Create a new camera on the given Evas @p canvas. - * - * @param e The given canvas. - * @return The created camera handle. - * - * @since 1.10 - * - * @ingroup Evas_3D_Camera - */ -EAPI Evas_3D_Camera *evas_3d_camera_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Delete a node from its belonging Evas canvas. - * - * @param camera The given camera. - * - * @see evas_3d_camera_add() - * @since 1.10 - * - * @ingroup Evas_3D_Camera - */ -EAPI void evas_3d_camera_del(Evas_3D_Camera *camera) EINA_ARG_NONNULL(1); - -/** - * Set the projection matrix of the given camera. - * - * @param camera The given camera. - * @param matrix Pointer to the array of 16 Evas_Real values in column major - * order. - * - * Default projection matrix is identity matrix. - * - * @see evas_3d_camera_projection_perspective_set() - * @see evas_3d_camera_projection_ortho_set() - * @see evas_3d_camera_projection_frustum_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Camera - */ -EAPI void evas_3d_camera_projection_matrix_set(Evas_3D_Camera *camera, const Evas_Real *matrix) EINA_ARG_NONNULL(1); - -/** - * Get the projection matrix of the given camera. - * - * @param camera The given camera. - * @param matrix Pointer to receive the 16 Evas_Real values in column major - * order. - * - * @see evas_3d_camera_projection_matrix_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Camera - */ -EAPI void evas_3d_camera_projection_matrix_get(const Evas_3D_Camera *camera, Evas_Real *matrix) EINA_ARG_NONNULL(1, 2); - -/** - * Set the projection matrix of the given camera with perspective projection. - * - * @param camera The given camera. - * @param fovy Field of view angle in Y direction. - * @param aspect Aspect ratio. - * @param near Distance to near clipping plane. - * @param far Distance to far clipping plane. - * - * @see evas_3d_camera_projection_matrix_set() - * @since 1.10 - * - * @ingroup Evas_3D_Camera - */ -EAPI void evas_3d_camera_projection_perspective_set(Evas_3D_Camera *camera, Evas_Real fovy, Evas_Real aspect, Evas_Real near, Evas_Real far) EINA_ARG_NONNULL(1); - -/** - * Set the projection matrix of the given camera with frustum projection. - * - * @param camera The given camera. - * @param left Left X coordinate of the near clipping plane. - * @param right Right X coordinate of the near clipping plane. - * @param top Top Y coordinate of the near clipping plane. - * @param bottom Bottom Y coordinate of the near clipping plane. - * @param near Distance to near clipping plane. - * @param far Distance to far clipping plane. - * - * @see evas_3d_camera_projection_matrix_set() - * @since 1.10 - * - * @ingroup Evas_3D_Camera - */ -EAPI void evas_3d_camera_projection_frustum_set(Evas_3D_Camera *camera, Evas_Real left, Evas_Real right, Evas_Real bottom, Evas_Real top, Evas_Real near, Evas_Real far) EINA_ARG_NONNULL(1); - -/** - * Set the projection matrix of the given camera with orthogonal projection. - * - * @param camera The given camera. - * @param left Left X coordinate of the near clipping plane. - * @param right Right X coordinate of the near clipping plane. - * @param top Top Y coordinate of the near clipping plane. - * @param bottom Bottom Y coordinate of the near clipping plane. - * @param near Distance to near clipping plane. - * @param far Distance to far clipping plane. - * - * @see evas_3d_camera_projection_matrix_set() - * @since 1.10 - * - * @ingroup Evas_3D_Camera - */ -EAPI void evas_3d_camera_projection_ortho_set(Evas_3D_Camera *camera, Evas_Real left, Evas_Real right, Evas_Real bottom, Evas_Real top, Evas_Real near, Evas_Real far) EINA_ARG_NONNULL(1); - -/** - * Create a new light on the given Evas @p canvas. - * - * @param e The given canvas. - * @return The created light handle. - * - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI Evas_3D_Light *evas_3d_light_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Delete a node from its belonging Evas canvas. - * - * @param light The given light. - * - * @see evas_3d_light_add() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_del(Evas_3D_Light *light) EINA_ARG_NONNULL(1); - -/** - * Set the directional flag of the given light. - * - * @param light The given light. - * @param directional Whether the light is directional (@c EINA_TRUE), or not - * (@c EINA_FALSE). - * - * Directional light is a type of light which is infinitely far away with no - * attenuation. The light direction is determined by the containing node's - * forward vector (negative Z-axis). - * - * By default, directional is not enabled. - * - * @see evas_3d_node_look_at_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_directional_set(Evas_3D_Light *light, Eina_Bool directional) EINA_ARG_NONNULL(1); - -/** - * Get the directional flag of the given light. - * - * @param light The given light. - * @return @c EINA_TRUE if the light is directional or @c EINA_FALSE if not. - * - * @see evas_3d_light_directional_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI Eina_Bool evas_3d_light_directional_get(const Evas_3D_Light *light) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the ambient color of the given light. - * - * @param light The given light. - * @param r Red component of the ambient color between [0.0, 1.0]. - * @param g Green component of the ambient color between [0.0, 1.0]. - * @param b Blue component of the ambient color between [0.0, 1.0]. - * @param a Alpha component of the ambient color between [0.0, 1.0]. - * - * Default ambient color is (0.0, 0.0, 0.0, 1.0). - * - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_ambient_set(Evas_3D_Light *light, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) EINA_ARG_NONNULL(1); - -/** - * Get the ambient color of the given light. - * - * @param light The given light. - * @param r Pointer to receive the red component of the ambient color. - * @param g Pointer to receive the green component of the ambient color. - * @param b Pointer to receive the blue component of the ambient color. - * @param a Pointer to receive the alpha component of the ambient color. - * - * @see evas_3d_light_ambient_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_ambient_get(const Evas_3D_Light *light, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) EINA_ARG_NONNULL(1); - -/** - * Set the diffuse color of the given light. - * - * @param light The given light. - * @param r Red component of the diffuse color between [0.0, 1.0]. - * @param g Green component of the diffuse color between [0.0, 1.0]. - * @param b Blue component of the diffuse color between [0.0, 1.0]. - * @param a Alpha component of the diffuse color between [0.0, 1.0]. - * - * Default diffuse color is (1.0, 1.0, 1.0, 1.0). - * - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_diffuse_set(Evas_3D_Light *light, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) EINA_ARG_NONNULL(1); - -/** - * Get the diffuse color of the given light. - * - * @param light The given light. - * @param r Pointer to receive the red component of the diffuse color. - * @param g Pointer to receive the green component of the diffuse color. - * @param b Pointer to receive the blue component of the diffuse color. - * @param a Pointer to receive the alpha component of the diffuse color. - * - * @see evas_3d_light_diffuse_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_diffuse_get(const Evas_3D_Light *light, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) EINA_ARG_NONNULL(1); - -/** - * Get the specular color of the given light. - * - * @param light The given light. - * @param r Pointer to receive the red component of the specular color. - * @param g Pointer to receive the green component of the specular color. - * @param b Pointer to receive the blue component of the specular color. - * @param a Pointer to receive the alpha component of the specular color. - * - * Default specular color is (1.0, 1.0, 1.0, 1.0). - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_specular_set(Evas_3D_Light *light, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) EINA_ARG_NONNULL(1); - -/** - * Get the specular color of the given light. - * - * @param light The given light. - * @param r Pointer to receive the red component of the specular color. - * @param g Pointer to receive the green component of the specular color. - * @param b Pointer to receive the blue component of the specular color. - * @param a Pointer to receive the alpha component of the specular color. - * - * @see evas_3d_light_specular_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_specular_get(const Evas_3D_Light *light, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) EINA_ARG_NONNULL(1); - -/** - * Set the spot exponent of the given light. - * - * @param light The given light. - * @param exponent Spot exponent value. - * - * Higher spot exponent means intensity at the center of the cone is relatively - * stronger. Zero exponent means the light intensity is evenly distibuted. The - * spot exponent has no effect when the light is not spot light (spot cutoff - * angle is less than 180 degree). - * - * Default spot exponent is 0. - * - * @see evas_3d_light_spot_cutoff_set()i - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_spot_exponent_set(Evas_3D_Light *light, Evas_Real exponent) EINA_ARG_NONNULL(1); - -/** - * Get the spot exponent of the given light. - * - * @param light The given light. - * @return The spot exponent value. - * - * @see evas_3d_light_spot_exponent_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI Evas_Real evas_3d_light_spot_exponent_get(const Evas_3D_Light *light) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the spot cutoff angle of the given light. - * - * @param light The given light. - * @param cutoff Cutoff angle in degree. - * - * Only angle less than 180 degree will make it spot light, so that other spot - * light attribute will take effect. - * - * Default spot cutoff angle is 180. - * - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_spot_cutoff_set(Evas_3D_Light *light, Evas_Real cutoff) EINA_ARG_NONNULL(1); - -/** - * Get the spot cutoff angle of the given light. - * - * @param light The given light. - * @return Cutoff angle in degree. - * - * @see evas_3d_light_spot_cutoff_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI Evas_Real evas_3d_light_spot_cutoff_get(const Evas_3D_Light *light) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the attenuation of the given light. - * - * @param light The given light. - * @param constant Constant attenuation term. - * @param linear Linear attenuation term. - * @param quadratic Quadratic attenuation term. - * - * Light attenuation has no effect with directional light. And the attenuation - * should be enabled first to take effect. The attenuation factor is calculated - * as follows. - * - * atten = 1.0 / constant + linear * distance + quadratic * distance * distance - * - * Default attenuation is constant = 1.0, linear = 0.0, quadratic = 0.0. - * - * @see evas_3d_light_attenuation_enable_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_attenuation_set(Evas_3D_Light *light, Evas_Real constant, Evas_Real linear, Evas_Real quadratic) EINA_ARG_NONNULL(1); - -/** - * Get the attenuation of the given light. - * - * @param light The given light. - * @param constant Pointer to receive constant attenuation term. - * @param linear Pointer to receive linear attenuation term. - * @param quadratic Pointer to receive quadratic attenuation term. - * - * @see evas_3d_light_attenuation_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_attenuation_get(const Evas_3D_Light *light, Evas_Real *constant, Evas_Real *linear, Evas_Real *quadratic) EINA_ARG_NONNULL(1); - -/** - * Set the attenuation enable flag of the given light. - * - * @param light The given light. - * @param enable Whether to enable attenuation (@c EINA_TRUE), or not - * (@c EINA_FALSE). - * - * By default, light attenuation is not enabled. - * - * @see evas_3d_light_attenuation_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI void evas_3d_light_attenuation_enable_set(Evas_3D_Light *light, Eina_Bool enable) EINA_ARG_NONNULL(1); - -/** - * Get the attenuation enable flag of the given light. - * - * @param light The given light. - * @return @c EINA_TRUE if enabled, or @c EINA_FALSE if not. - * - * @see evas_3d_light_attenuation_enable_set() - * @since 1.10 - * - * @ingroup Evas_3D_Light - */ -EAPI Eina_Bool evas_3d_light_attenuation_enable_get(const Evas_3D_Light *light) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Create a new mesh on the given Evas @p canvas. - * - * @param e The given canvas. - * @return The created mesh handle. - * - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI Evas_3D_Mesh *evas_3d_mesh_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Delete a mesh from its belonging Evas canvas. - * - * @param mesh The given mesh. - * - * @see evas_3d_mesh_add() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_del(Evas_3D_Mesh *mesh) EINA_ARG_NONNULL(1); - -/** - * Set the shade mode of the given mesh. - * - * @param mesh The given mesh. - * @param mode The shade mode. - * - * Default shade mode is EVAS_3D_SHADE_MODE_VERTEX_COLOR. - * - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_shade_mode_set(Evas_3D_Mesh *mesh, Evas_3D_Shade_Mode mode) EINA_ARG_NONNULL(1); - -/** - * Get the shade mode of the given mesh. - * - * @param mesh The given mesh. - * @return The shade mode. - * - * @see eavs_3d_mesh_shade_mode_set() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI Evas_3D_Shade_Mode evas_3d_mesh_shade_mode_get(const Evas_3D_Mesh *mesh) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Load mesh data from file. - * - * @param mesh The given mesh. - * @param type The type of the mesh file. - * @param file Path to the mesh file. - * @param key Key in the mesh file. - * - * Loading a mesh from existing file is supported. Currently, only MD2 file - * format is supported. - * - * @ingroup Evas_3D_Mesh - * @since 1.10 - */ -EAPI void evas_3d_mesh_file_set(Evas_3D_Mesh *mesh, Evas_3D_Mesh_File_Type type, const char *file, const char *key) EINA_ARG_NONNULL(1); - -/** - * Set the vertex count of the given mesh. - * - * @param mesh The given mesh. - * @param count Vertex count. - * - * Each key frame should have same vertex count to be properly interpolated. - * Key frames have their own vertex data and the data should have more vertices - * than the mesh's vertex count. - * - * Default vertex count is 0. - * - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_vertex_count_set(Evas_3D_Mesh *mesh, unsigned int count) EINA_ARG_NONNULL(1); - -/** - * Get the vertex count of the given mesh. - * - * @param mesh The given mesh. - * @return Vertex count. - * - * @see evas_3d_mesh_vertex_count_set() - * - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI int evas_3d_mesh_vertex_count_get(const Evas_3D_Mesh *mesh) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Add a key frame to the given mesh. - * - * @param mesh The given mesh. - * @param frame The number of the key frame to be added. - * - * If specified frame is already exist, nothing will be happened. - * - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_frame_add(Evas_3D_Mesh *mesh, int frame) EINA_ARG_NONNULL(1); - -/** - * Delete a key frame from the given mesh. - * - * @param mesh The given mesh. - * @param frame The number of the key frame to be deleted. - * - * @see evas_3d_mesh_frame_add() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_frame_del(Evas_3D_Mesh *mesh, int frame) EINA_ARG_NONNULL(1); - -/** - * Set the material of the key frame of the given mesh. - * - * @param mesh The given mesh. - * @param frame The number of the key frame. - * @param material The material to be set to the key frame. - * - * Setting different materials for each key frame is useful for doing animations - * like GIF images or color changing animationas. - * - * @see evas_3d_mesh_frame_add() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_frame_material_set(Evas_3D_Mesh *mesh, int frame, Evas_3D_Material *material) EINA_ARG_NONNULL(1); - -/** - * Get the material of the key frame of the given mesh. - * - * @param mesh The given mesh. - * @param frame The number of the key frame. - * @return The material of the key frame. - * - * @see evas_3d_mesh_frame_material_set() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI Evas_3D_Material *evas_3d_mesh_frame_material_get(const Evas_3D_Mesh *mesh, int frame) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the vertex data of the key frame of the given mesh. - * - * @param mesh The given mesh. - * @param frame The number of the key frame. - * @param attrib Vertex attribute ID. - * @param stride Stride to go to the next vertex (in bytes). - * @param data Pointer to the vertex data buffer. - * - * This function make evas read from the given buffer whenever it requires. - * If you want to release the buffer after calling this functions, use - * evas_3d_mesh_frame_vertex_data_copy_set() instead. - * - * After setting the vertex data, further modifications should be protected - * by map/unmap pair. - * - * @see evas_3d_mesh_frame_add() - * @see evas_3d_mesh_frame_vertex_data_copy_set() - * @see evas_3d_mesh_frame_vertex_data_map() - * @see evas_3d_mesh_frame_vertex_data_unmap() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_frame_vertex_data_set(Evas_3D_Mesh *mesh, int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data) EINA_ARG_NONNULL(1); - -/** - * Set the vertex data of the key frame of the given mesh by copying from a - * buffer. - * - * @param mesh The given mesh. - * @param frame The number of the key frame. - * @param attrib Vertex attribute ID. - * @param stride Stride to go to the next vertex (in bytes). - * @param data Pointer to the vertex data buffer. - * - * This function allocates internal vertex buffer and copy from the given - * buffer. So you can release the buffer. If you want to modify the vertex data - * use evas_3d_mesh_frame_vertex_data_map(). After finishing the modifications, - * you should call evas_3d_mesh_frame_vertex_data_unmap(). - * - * @see evas_3d_mesh_frame_add() - * @see evas_3d_mesh_frame_vertex_data_set() - * @see evas_3d_mesh_frame_vertex_data_map() - * @see evas_3d_mesh_frame_vertex_data_unmap() - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_frame_vertex_data_copy_set(Evas_3D_Mesh *mesh, int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data) EINA_ARG_NONNULL(1); - -/** - * Map the vertex buffer of the key frame of the given mesh. - * - * @param mesh The given mesh. - * @param frame The number of the key frame. - * @param attrib Vertex attribute ID. - * @return Starting address of the mapped vertex buffer. - * - * After manipulating the mapped buffer, evas_3d_mesh_frame_vertex_data_unmap() - * should be called to properly download the data to the engine. If the data - * was set using evas_3d_mesh_frame_vertex_data_set(), pointer to the original - * buffer will be returned. Otherwise, the returned pointer can differ every - * time calling this function. - * - * @see evas_3d_mesh_frame_vertex_data_unmap() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void *evas_3d_mesh_frame_vertex_data_map(Evas_3D_Mesh *mesh, int frame, Evas_3D_Vertex_Attrib attrib) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Unmap the vertex buffer of the key frame of the given mesh. - * - * @param mesh The given mesh. - * @param frame The number of the key frame. - * @param attrib Vertex attribute ID. - * - * @see evas_3d_mesh_frame_vertex_data_map() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_frame_vertex_data_unmap(Evas_3D_Mesh *mesh, int frame, Evas_3D_Vertex_Attrib attrib) EINA_ARG_NONNULL(1); - -/** - * Get the vertex buffer stride of the key frame of the given mesh. - * - * @param mesh The given mesh. - * @param frame The number of the key frame. - * @param attrib Vertex attribute ID. - * @return Stride to go to the next vertex (in bytes). - * - * This function returns valid stride only when the vertex buffer is mapped. - * If the data was set with evas_3d_mesh_frame_vertex_data_set(), the original - * stride will be returned unchanged. - * - * @see evas_3d_mesh_frame_vertex_data_map() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI int evas_3d_mesh_frame_vertex_stride_get(const Evas_3D_Mesh *mesh, int frame, Evas_3D_Vertex_Attrib attrib) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the vertex index data of the given mesh. - * - * @param mesh The given mesh. - * @param format Vertex index data format. - * @param count Vertex index count. - * @param indices Pointer to the index data. - * - * When the index data is set, Evas 3D assembles vertices using the index data. - * If you want to free the data buffer, use evas_3d_mesh_index_data_copy_set(). - * Further modifications should be made within map/unmap pair. - * - * @see evas_3d_mesh_index_data_copy_set() - * @see evas_3d_mesh_index_data_map() - * @see evas_3d_mesh_index_data_unmap() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_index_data_set(Evas_3D_Mesh *mesh, Evas_3D_Index_Format format, int count, const void *indices) EINA_ARG_NONNULL(1); - -/** - * Set the vertex index data of the given mesh by copying from a buffer. - * - * @param mesh The given mesh. - * @param format Vertex index data format. - * @param count Vertex index count. - * @param indices Pointer to the vertex data. - * - * This function allocates internal index buffer any copy data from the given - * buffer. Futher modifications can be made within map/unmap pair. - * - * @see evas_3d_mesh_index_data_set() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_index_data_copy_set(Evas_3D_Mesh *mesh, Evas_3D_Index_Format format, int count, const void *indices) EINA_ARG_NONNULL(1); - -/** - * Get the format of the index data of the given mesh. - * - * @param mesh The given mesh. - * @return Format of the index data. - * - * Returns valid format only when the index buffer is mapped. First map the - * index buffer and then query the properties of the mapped buffer. If the index - * data was set by evas_3d_mesh_index_data_set(), the original format will be - * returned. Otherwise the format can differ every time you call the - * evas_3d_mesh_index_data_map() function. - * - * @see evas_3d_mesh_index_data_map() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI Evas_3D_Index_Format evas_3d_mesh_index_format_get(const Evas_3D_Mesh *mesh) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the count of the index data of the given mesh. - * - * @param mesh The given mesh. - * @return Index data count. - * - * This function returns the index count of the last called data_set function. - * - * @see evas_3d_mesh_index_data_set() - * @see evas_3d_mesh_index_data_copy_set() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI int evas_3d_mesh_index_count_get(const Evas_3D_Mesh *mesh) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Map the index buffer of the given mesh. - * - * @param mesh The given mesh. - * @return Pointer to the mapped buffer. - * - * evas_3d_mesh_index_data_unmap() should be called after modifications. If the - * data was set using evas_3d_mesh_index_data_set(), the original pointer will - * be returned, otherwise, the returned pointer may differ every time you call - * this function. - * - * @see evas_3d_mesh_index_data_unmap() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void *evas_3d_mesh_index_data_map(Evas_3D_Mesh *mesh) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Unmap the index buffer of the given mesh. - * - * @param mesh The given mesh. - * - * @see evas_3d_mesh_index_data_map() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_index_data_unmap(Evas_3D_Mesh *mesh) EINA_ARG_NONNULL(1); - -/** - * Set the vertex assembly of the given mesh. - * - * @param mesh The given mesh. - * @param assembly Vertex assembly. - * - * Vertex assembly defines how the engine organizes vertices into geometric - * primitives. - * - * Default vertex assembly is EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES. - * - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI void evas_3d_mesh_vertex_assembly_set(Evas_3D_Mesh *mesh, Evas_3D_Vertex_Assembly assembly); - -/** - * Get the vertex assembly of the given mesh. - * - * @param mesh The given mesh. - * @return The vertex assembly. - * - * @see evas_3d_mesh_vertex_assembly_set() - * @since 1.10 - * - * @ingroup Evas_3D_Mesh - */ -EAPI Evas_3D_Vertex_Assembly evas_3d_mesh_vertex_assembly_get(const Evas_3D_Mesh *mesh); - -/** - * Create a new texture on the given Evas @p canvas. - * - * @param e The given canvas. - * @return The created texture handle. - * - * @ingroup Evas_3D_Texture - */ -EAPI Evas_3D_Texture *evas_3d_texture_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Delete a texture from its belonging Evas canvas. - * - * @param texture The given texture. - * - * @see evas_3d_texture_add() - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_del(Evas_3D_Texture *texture) EINA_ARG_NONNULL(1); - -/** - * Set the data of the given texture. - * - * @param texure The given texture - * @param color_format Color format of the texture. - * @param pixel_format Pixel format of the data. - * @param w Width of the data. - * @param h Height of the data. - * @param data Pointer to the data. - * - * @see evas_3d_texture_file_set() - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_data_set(Evas_3D_Texture *texture, Evas_3D_Color_Format color_format, Evas_3D_Pixel_Format pixel_format, int w, int h, const void *data); - -/** - * Set the data of the given texture from file. - * - * @param texture The given texture. - * @param file The image file path. - * @param key The image key in @p file (if its an Eet one), or @c NULL, - * otherwise. - * - * If the file supports multiple data stored in it (as Eet files do), - * you can specify the key to be used as the index of the image in - * this file. - * - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_file_set(Evas_3D_Texture *texture, const char *file, const char *key) EINA_ARG_NONNULL(1); - -/** - * Set the data of the given texture from an evas object. - * - * @param texture The given texture. - * @param source Source evas object to be used as the texture data. - * - * Evas 3D support using existing evas object as a texture source. This feature - * make it possible using any exisiting evas object inside 3D scene. - * - * @see evas_3d_texture_source_visible_set - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_source_set(Evas_3D_Texture *texture, Evas_Object *source) EINA_ARG_NONNULL(1); - -/** - * Set the visibility flag of the source evas object of the given texture. - * - * @param texture The given texture. - * @param visible @c EINA_TRUE for visible, @c EINA_FALSE for invisible. - * - * Recommend to call evas_object_show() on the source object and controll the - * visibility using this function. - * - * By default, source object is visible. - * - * @see evas_3d_texture_source_set() - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_source_visible_set(Evas_3D_Texture *texture, Eina_Bool visible) EINA_ARG_NONNULL(1); - -/** - * Get the visibility flag of the source evas object of the given texture. - * - * @param texture The given texture. - * @return @c EINA_TRUE if visible, @c EINA_FALSE if invisible. - * - * @see evas_3d_texture_source_visible_set() - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI Eina_Bool evas_3d_texture_source_visible_get(const Evas_3D_Texture *texture) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the color format of the given texture. - * - * @param texture The given texture. - * - * EVAS_3D_COLOR_FORMAT_RGBA will be returned if the texture has source object. - * Otherwise, the color format of the data will be returned. - * - * @see evas_3d_texture_data_set() - * @see evas_3d_texture_file_set() - * @see evas_3d_texture_source_set() - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI Evas_3D_Color_Format evas_3d_texture_color_format_get(const Evas_3D_Texture *texture) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Get the size of the given texture. - * - * @param texture The given texture. - * @param w Pointer to receive the width of the texture size. - * @param h Pointer to receive the height of the texture size. - * - * If the texture has source object, the size of the source object will be - * returned. Otherwise, the size of the data (or image file) will be returned. - * - * @see evas_3d_texture_data_set() - * @see evas_3d_texture_file_set() - * @see evas_3d_texture_source_set() - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_size_get(const Evas_3D_Texture *texture, int *w, int *h) EINA_ARG_NONNULL(1); - -/** - * Set the wrap mode of the given texture. - * - * @param texture The given texture. - * @param s Wrap mode for S-axis. - * @param t Wrap mode for T-axis. - * - * If the texture coordinate exceed range [0.0, 1.0] the values are modified - * according to the wrap mode. - * - * Default wrap modes are both EVAS_3D_WRAP_MODE_CLAMP for s and t. - * - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_wrap_set(Evas_3D_Texture *texture, Evas_3D_Wrap_Mode s, Evas_3D_Wrap_Mode t) EINA_ARG_NONNULL(1); - -/** - * Get the wrap mode of the given texture. - * - * @param texture The given texture. - * @param s Pointer to receive S-axis wrap mode. - * @param t Pointer to receive T-axis wrap mode. - * - * @see evas_3d_texture_wrap_set() - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_wrap_get(Evas_3D_Texture *texture, Evas_3D_Wrap_Mode *s, Evas_3D_Wrap_Mode *t) EINA_ARG_NONNULL(1); - -/** - * Set the filter of the given texture. - * - * @param texture The given texture. - * @param min Minification filter used when down-scaling. - * @param mag Magnification filter used when up-scaling. - * - * Default filters are both EVAS_3D_TEXTURE_FILTER_NEAREST for s and t. - * - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_filter_set(Evas_3D_Texture *texture, Evas_3D_Texture_Filter min, Evas_3D_Texture_Filter mag) EINA_ARG_NONNULL(1); - -/** - * Get the filter of the given texture. - * - * @param texture The given texture. - * @param min Pointer to receive the minification filter. - * @param mag Pointer to receive the magnification filter. - * - * @see evas_3d_texture_filter_set() - * @since 1.10 - * - * @ingroup Evas_3D_Texture - */ -EAPI void evas_3d_texture_filter_get(const Evas_3D_Texture *texture, Evas_3D_Texture_Filter *min, Evas_3D_Texture_Filter *mag) EINA_ARG_NONNULL(1); - -/** - * Create a new material on the given Evas @p canvas. - * - * @param e The given canvas. - * @param type The type of the material. - * @return The created material handle. - * - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI Evas_3D_Material *evas_3d_material_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Delete a material from its belonging Evas canvas. - * - * @param material The given material. - * - * @see evas_3d_material_add() - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI void evas_3d_material_del(Evas_3D_Material *material) EINA_ARG_NONNULL(1); - -/** - * Set the material attribute enable flag of the given material. - * - * @param material The given material. - * @param attrib Material attribute ID. - * @param enable Whether to enable the attribute (@c EINA_TRUE), or not - * (@c EINA_FALSE). - * - * You might want to disable some material reflection contribution. For - * example,Emission attribute is rarely used. Disabling unused attributes - * might help the shading less complex so that can get speed up. - * - * By default, diffuse and specular is enabled. - * - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI void evas_3d_material_enable_set(Evas_3D_Material *material, Evas_3D_Material_Attrib attrib, Eina_Bool enable) EINA_ARG_NONNULL(1); - -/** - * Get the material attribute enable flag of the given material. - * - * @param material The given material. - * @param attrib Material attribute ID. - * @return @c EINA_TRUE if enabled, or @c EINA_FALSE if not. - * - * @see evas_3d_material_enable_set() - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI Eina_Bool evas_3d_material_enable_get(const Evas_3D_Material *material, Evas_3D_Material_Attrib attrib) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the material attribute color of the given material. - * - * @param material The given material. - * @param attrib Material attribute ID. - * @param r Red component of the color. - * @param g Green component of the color. - * @param b Blue component of the color. - * @param a Alpha component of the color. - * - * Material color is used also when texture map is enabled. The colors will be - * modulated (multiplied). To controll the color contribution of a material - * attribute, use gray color. Setting color value for normal attribute has no - * effect. - * - * Default color is as follows. - * - * Ambient : (0.2, 0.2, 0.2, 1.0) - * Diffuse : (0.8, 0.8, 0.8, 1.0) - * Specular : (1.0, 1.0, 1.0, 1.0) - * Emission : (0.0, 0.0, 0.0, 1.0) - * Normal : Not used - * - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI void evas_3d_material_color_set(Evas_3D_Material *material, Evas_3D_Material_Attrib attrib, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) EINA_ARG_NONNULL(1); - -/** - * Get the material attribute color of the given material. - * - * @param material The given material. - * @param attrib Material attribute ID. - * @param r Pointer to receive red component of the color. - * @param g Pointer to receive green component of the color. - * @param b Pointer to receive blue component of the color. - * @param a Pointer to receive alpha component of the color. - * - * @see evas_3d_material_color_set() - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI void evas_3d_material_color_get(const Evas_3D_Material *material, Evas_3D_Material_Attrib attrib, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) EINA_ARG_NONNULL(1); - -/** - * Set the shininess of the given material. - * - * @param material The given material. - * @param shininess Shininess value. - * - * Shininess is only used when specular attribute is enabled. Higher shininess - * value will make the object more shiny. - * - * Default shininess value is 150.0. - * - * @see evas_3d_material_enable_set() - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI void evas_3d_material_shininess_set(Evas_3D_Material *material, Evas_Real shininess) EINA_ARG_NONNULL(1); - -/** - * Get the shininess of the given material. - * - * @param material The given material. - * @return The shininess value. - * - * @see evas_3d_material_shininess_set() - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI Evas_Real evas_3d_material_shininess_get(const Evas_3D_Material *material) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - -/** - * Set the texture of the given material. - * - * @param material The given material. - * @param attrib Material attribute ID. - * @param texture Texture to be set. - * - * You have to enable the desired attribute first. - * - * @see evas_3d_material_enable_set() - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI void evas_3d_material_texture_set(Evas_3D_Material *material, Evas_3D_Material_Attrib attrib, Evas_3D_Texture *texture) EINA_ARG_NONNULL(1); - -/** - * Get the texture of the given material. - * - * @param material The given material. - * @param attrib Material attribute ID. - * @return The texture that is set to the given material attribute. - * - * @see evas_3d_material_texture_set() - * @since 1.10 - * - * @ingroup Evas_3D_Material - */ -EAPI Evas_3D_Texture *evas_3d_material_texture_get(const Evas_3D_Material *material, Evas_3D_Material_Attrib attrib) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); - diff --git a/src/lib/evas/canvas/evas_3d_camera.c b/src/lib/evas/canvas/evas_3d_camera.c index 0bab0f5efb..308c083ee4 100644 --- a/src/lib/evas/canvas/evas_3d_camera.c +++ b/src/lib/evas/canvas/evas_3d_camera.c @@ -3,7 +3,7 @@ #include "Eo.h" -#define MY_CLASS EO_EVAS_3D_CAMERA_CLASS +#define MY_CLASS EVAS_3D_CAMERA_CLASS static Eina_Bool @@ -11,18 +11,18 @@ _camera_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data EINA_UNUSED, void *fdata) { Evas_3D_Node *n = *(Evas_3D_Node **)key; - evas_3d_object_change(n, EVAS_3D_STATE_NODE_CAMERA, (Evas_3D_Object *)fdata); + eo_do(n, evas_3d_object_change(EVAS_3D_STATE_NODE_CAMERA, (Evas_3D_Object *)fdata)); return EINA_TRUE; } EOLIAN static void -_eo_evas_3d_camera_eo_evas_3d_object_change_notify(Eo *obj,Evas_3D_Camera_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) +_evas_3d_camera_evas_3d_object_change_notify(Eo *obj,Evas_3D_Camera_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) { if (pd->nodes) eina_hash_foreach(pd->nodes, _camera_node_change_notify, obj); } EOLIAN static void -_eo_evas_3d_camera_eo_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, +_evas_3d_camera_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Camera_Data *pd EINA_UNUSED) { @@ -66,15 +66,15 @@ evas_3d_camera_node_del(Evas_3D_Camera *camera, Evas_3D_Node *node) } EOLIAN static void -_eo_evas_3d_camera_eo_base_constructor(Eo *obj, +_evas_3d_camera_eo_base_constructor(Eo *obj, Evas_3D_Camera_Data *pd EINA_UNUSED) { eo_do_super(obj, MY_CLASS, eo_constructor()); - eo_do(obj, eo_evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_CAMERA)); + eo_do(obj, evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_CAMERA)); } EOLIAN static void -_eo_evas_3d_camera_eo_base_destructor(Eo *obj EINA_UNUSED, +_evas_3d_camera_eo_base_destructor(Eo *obj EINA_UNUSED, Evas_3D_Camera_Data *pd) { //evas_3d_object_unreference(&pd->base); @@ -93,15 +93,15 @@ evas_3d_camera_add(Evas *e) } EOLIAN static void -_eo_evas_3d_camera_projection_matrix_set(Eo *obj, Evas_3D_Camera_Data *pd, +_evas_3d_camera_projection_matrix_set(Eo *obj, Evas_3D_Camera_Data *pd, const Evas_Real *matrix) { evas_mat4_array_set(&pd->projection, matrix); - evas_3d_object_change(obj, EVAS_3D_STATE_CAMERA_PROJECTION, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL)); } EOLIAN static void -_eo_evas_3d_camera_projection_matrix_get(Eo *obj EINA_UNUSED, +_evas_3d_camera_projection_matrix_get(Eo *obj EINA_UNUSED, Evas_3D_Camera_Data *pd, Evas_Real *matrix) { @@ -109,7 +109,7 @@ _eo_evas_3d_camera_projection_matrix_get(Eo *obj EINA_UNUSED, } EOLIAN static void -_eo_evas_3d_camera_projection_perspective_set(Eo *obj, Evas_3D_Camera_Data *pd, +_evas_3d_camera_projection_perspective_set(Eo *obj, Evas_3D_Camera_Data *pd, Evas_Real fovy, Evas_Real aspect, Evas_Real dnear, Evas_Real dfar) { @@ -120,27 +120,27 @@ _eo_evas_3d_camera_projection_perspective_set(Eo *obj, Evas_3D_Camera_Data *pd, xmax = ymax * aspect; evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar); - evas_3d_object_change(obj, EVAS_3D_STATE_CAMERA_PROJECTION, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL)); } EOLIAN static void -_eo_evas_3d_camera_projection_frustum_set(Eo *obj, Evas_3D_Camera_Data *pd, +_evas_3d_camera_projection_frustum_set(Eo *obj, Evas_3D_Camera_Data *pd, Evas_Real left, Evas_Real right, Evas_Real bottom, Evas_Real top, Evas_Real dnear, Evas_Real dfar) { evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar); - evas_3d_object_change(obj, EVAS_3D_STATE_CAMERA_PROJECTION, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL)); } EOLIAN static void -_eo_evas_3d_camera_projection_ortho_set(Eo *obj, Evas_3D_Camera_Data *pd, +_evas_3d_camera_projection_ortho_set(Eo *obj, Evas_3D_Camera_Data *pd, Evas_Real left, Evas_Real right, Evas_Real bottom, Evas_Real top, Evas_Real dnear, Evas_Real dfar) { evas_mat4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar); - evas_3d_object_change(obj, EVAS_3D_STATE_CAMERA_PROJECTION, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_CAMERA_PROJECTION, NULL)); } #include "canvas/evas_3d_camera.eo.c" diff --git a/src/lib/evas/canvas/evas_3d_camera.eo b/src/lib/evas/canvas/evas_3d_camera.eo index 1618920241..c4d990782f 100644 --- a/src/lib/evas/canvas/evas_3d_camera.eo +++ b/src/lib/evas/canvas/evas_3d_camera.eo @@ -1,4 +1,4 @@ -class EO_Evas_3D_Camera (EO_Evas_3D_Object, Evas_Common_Interface) +class Evas_3D_Camera (Evas_3D_Object, Evas_Common_Interface) { legacy_prefix: evas_3d_camera; data: Evas_3D_Camera_Data; @@ -18,6 +18,7 @@ class EO_Evas_3D_Camera (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Camera */ + legacy null; params { @in const Evas_Real *matrix; /*@ Projection Matrix */ } @@ -34,6 +35,7 @@ class EO_Evas_3D_Camera (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Camera */ + legacy null; const; params { @out Evas_Real matrix; /*@ Projection Matrix */ @@ -55,6 +57,7 @@ class EO_Evas_3D_Camera (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Camera */ + legacy null; params { Evas_Real fovy; /*@ Field of view angle in Y direction. */ Evas_Real aspect; /*@ Aspect ratio.*/ @@ -71,6 +74,7 @@ class EO_Evas_3D_Camera (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Camera */ + legacy null; params { Evas_Real left; /*@ Left X coordinate of the near clipping plane. */ Evas_Real right; /*@ Right X coordinate of the near clipping plane..*/ @@ -88,6 +92,7 @@ class EO_Evas_3D_Camera (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Camera */ + legacy null; params { Evas_Real left; /*@ Left X coordinate of the near clipping plane. */ Evas_Real right; /*@ Right X coordinate of the near clipping plane..*/ @@ -102,8 +107,8 @@ class EO_Evas_3D_Camera (EO_Evas_3D_Object, Evas_Common_Interface) implements { Eo_Base::constructor; Eo_Base::destructor; - EO_Evas_3D_Object::update_notify; - EO_Evas_3D_Object::change_notify; + Evas_3D_Object::update_notify; + Evas_3D_Object::change_notify; } } diff --git a/src/lib/evas/canvas/evas_3d_light.c b/src/lib/evas/canvas/evas_3d_light.c index 37d0b62fe9..a91766111b 100644 --- a/src/lib/evas/canvas/evas_3d_light.c +++ b/src/lib/evas/canvas/evas_3d_light.c @@ -9,7 +9,7 @@ #include "Eo.h" -#define MY_CLASS EO_EVAS_3D_LIGHT_CLASS +#define MY_CLASS EVAS_3D_LIGHT_CLASS static Eina_Bool @@ -17,19 +17,19 @@ _light_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data EINA_UNUSED, void *fdata) { Evas_3D_Node *n = *(Evas_3D_Node **)key; - evas_3d_object_change(n, EVAS_3D_STATE_NODE_LIGHT, (Evas_3D_Object *)fdata); + eo_do(n, evas_3d_object_change(EVAS_3D_STATE_NODE_LIGHT, (Evas_3D_Object *)fdata)); return EINA_TRUE; } EOLIAN static void -_eo_evas_3d_light_eo_evas_3d_object_change_notify(Eo *obj, Evas_3D_Light_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) +_evas_3d_light_evas_3d_object_change_notify(Eo *obj, Evas_3D_Light_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) { if (pd->nodes) eina_hash_foreach(pd->nodes, _light_node_change_notify, obj); } EOLIAN static void -_eo_evas_3d_light_eo_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd EINA_UNUSED) +_evas_3d_light_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd EINA_UNUSED) { } @@ -87,10 +87,10 @@ evas_3d_light_add(Evas *e) } EOLIAN static void -_eo_evas_3d_light_eo_base_constructor(Eo *obj, Evas_3D_Light_Data *pd) +_evas_3d_light_eo_base_constructor(Eo *obj, Evas_3D_Light_Data *pd) { eo_do_super(obj, MY_CLASS, eo_constructor()); - eo_do(obj, eo_evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_LIGHT)); + eo_do(obj, evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_LIGHT)); evas_color_set(&pd->ambient, 0.0, 0.0, 0.0, 1.0); evas_color_set(&pd->diffuse, 1.0, 1.0, 1.0, 1.0); evas_color_set(&pd->specular, 1.0, 1.0, 1.0, 1.0); @@ -105,7 +105,7 @@ _eo_evas_3d_light_eo_base_constructor(Eo *obj, Evas_3D_Light_Data *pd) } EOLIAN static void -_eo_evas_3d_light_eo_base_destructor(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) +_evas_3d_light_eo_base_destructor(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) { if (pd->nodes) eina_hash_free(pd->nodes); @@ -113,34 +113,34 @@ _eo_evas_3d_light_eo_base_destructor(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd EOLIAN static void -_eo_evas_3d_light_directional_set(Eo *obj, Evas_3D_Light_Data *pd, Eina_Bool directional) +_evas_3d_light_directional_set(Eo *obj, Evas_3D_Light_Data *pd, Eina_Bool directional) { if (pd->directional != directional) { pd->directional = directional; - evas_3d_object_change(obj, EVAS_3D_STATE_ANY, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_ANY, NULL)); } } EOLIAN static Eina_Bool -_eo_evas_3d_light_directional_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) +_evas_3d_light_directional_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) { return pd->directional; } EOLIAN static void -_eo_evas_3d_light_ambient_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) +_evas_3d_light_ambient_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) { pd->ambient.r = r; pd->ambient.g = g; pd->ambient.b = b; pd->ambient.a = a; - evas_3d_object_change(obj, EVAS_3D_STATE_LIGHT_AMBIENT, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_AMBIENT, NULL)); } EOLIAN static void -_eo_evas_3d_light_ambient_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) +_evas_3d_light_ambient_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) { if (r) *r = pd->ambient.r; if (g) *g = pd->ambient.g; @@ -149,18 +149,18 @@ _eo_evas_3d_light_ambient_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_ } EOLIAN static void -_eo_evas_3d_light_diffuse_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) +_evas_3d_light_diffuse_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) { pd->diffuse.r = r; pd->diffuse.g = g; pd->diffuse.b = b; pd->diffuse.a = a; - evas_3d_object_change(obj, EVAS_3D_STATE_LIGHT_DIFFUSE, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_DIFFUSE, NULL)); } EOLIAN static void -_eo_evas_3d_light_diffuse_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) +_evas_3d_light_diffuse_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) { if (r) *r = pd->diffuse.r; if (g) *g = pd->diffuse.g; @@ -169,18 +169,18 @@ _eo_evas_3d_light_diffuse_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_ } EOLIAN static void -_eo_evas_3d_light_specular_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) +_evas_3d_light_specular_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) { pd->specular.r = r; pd->specular.g = g; pd->specular.b = b; pd->specular.a = a; - evas_3d_object_change(obj, EVAS_3D_STATE_LIGHT_SPECULAR, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_SPECULAR, NULL)); } EOLIAN static void -_eo_evas_3d_light_specular_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) +_evas_3d_light_specular_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) { if (r) *r = pd->specular.r; if (g) *g = pd->specular.g; @@ -189,43 +189,43 @@ _eo_evas_3d_light_specular_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas } EOLIAN static void -_eo_evas_3d_light_spot_exponent_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real exponent) +_evas_3d_light_spot_exponent_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real exponent) { pd->spot_exp = exponent; - evas_3d_object_change(obj, EVAS_3D_STATE_LIGHT_SPOT_EXP, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_SPOT_EXP, NULL)); } EOLIAN static Evas_Real -_eo_evas_3d_light_spot_exponent_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) +_evas_3d_light_spot_exponent_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) { return pd->spot_exp; } EOLIAN static void -_eo_evas_3d_light_spot_cutoff_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real cutoff) +_evas_3d_light_spot_cutoff_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real cutoff) { pd->spot_cutoff = cutoff; pd->spot_cutoff_cos = cos(cutoff * M_PI / 180.0); - evas_3d_object_change(obj, EVAS_3D_STATE_LIGHT_SPOT_CUTOFF, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_SPOT_CUTOFF, NULL)); } EOLIAN static Evas_Real -_eo_evas_3d_light_spot_cutoff_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) +_evas_3d_light_spot_cutoff_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) { return pd->spot_cutoff; } EOLIAN static void -_eo_evas_3d_light_attenuation_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real constant, Evas_Real linear, Evas_Real quadratic) +_evas_3d_light_attenuation_set(Eo *obj, Evas_3D_Light_Data *pd, Evas_Real constant, Evas_Real linear, Evas_Real quadratic) { pd->atten_const = constant; pd->atten_linear = linear; pd->atten_quad = quadratic; - evas_3d_object_change(obj, EVAS_3D_STATE_LIGHT_ATTENUATION, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_ATTENUATION, NULL)); } EOLIAN static void -_eo_evas_3d_light_attenuation_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Real *constant, Evas_Real *linear, Evas_Real *quadratic) +_evas_3d_light_attenuation_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, Evas_Real *constant, Evas_Real *linear, Evas_Real *quadratic) { if (constant) *constant = pd->atten_const; if (linear) *linear = pd->atten_linear; @@ -233,17 +233,17 @@ _eo_evas_3d_light_attenuation_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd, E } EOLIAN static void -_eo_evas_3d_light_attenuation_enable_set(Eo *obj, Evas_3D_Light_Data *pd, Eina_Bool enable) +_evas_3d_light_attenuation_enable_set(Eo *obj, Evas_3D_Light_Data *pd, Eina_Bool enable) { if (pd->enable_attenuation != enable) { pd->enable_attenuation = enable; - evas_3d_object_change(obj, EVAS_3D_STATE_LIGHT_ATTENUATION, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_LIGHT_ATTENUATION, NULL)); } } EOLIAN static Eina_Bool -_eo_evas_3d_light_attenuation_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) +_evas_3d_light_attenuation_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Light_Data *pd) { return pd->enable_attenuation; } diff --git a/src/lib/evas/canvas/evas_3d_light.eo b/src/lib/evas/canvas/evas_3d_light.eo index f7bd3250f4..e11dbc8332 100644 --- a/src/lib/evas/canvas/evas_3d_light.eo +++ b/src/lib/evas/canvas/evas_3d_light.eo @@ -1,4 +1,4 @@ -class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) +class Evas_3D_Light (Evas_3D_Object, Evas_Common_Interface) { legacy_prefix: evas_3d_light; data: Evas_3D_Light_Data; @@ -19,6 +19,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; } get { /*@ @@ -28,6 +29,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; } values { Eina_Bool directional; /*@ Whether the light is directional (@c EINA_TRUE), or not (@c EINA_FALSE).*/ @@ -50,6 +52,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; } get { /*@ @@ -59,6 +62,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; } values { Evas_Real exponent; /*@ Spot exponent value..*/ @@ -77,6 +81,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; } get { /*@ @@ -86,6 +91,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; } values { Evas_Real cutoff; /*@ Cutoff angle in degree..*/ @@ -103,6 +109,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; } get { /*@ @@ -112,6 +119,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; } values { Eina_Bool enable; /*@ Whether to enable attenuation (@c EINA_TRUE), or not (@c EINA_FALSE)..*/ @@ -127,6 +135,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; params { @in Evas_Real r; /*@ Red component of the ambient color between [0.0, 1.0]. */ @in Evas_Real g; /*@ Green component of the ambient color between [0.0, 1.0]. */ @@ -142,6 +151,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; const; params { @out Evas_Real r; /*@ Red component of the ambient color between [0.0, 1.0]. */ @@ -159,6 +169,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; params { @in Evas_Real r; /*@ Red component of the diffuse color between [0.0, 1.0]. */ @in Evas_Real g; /*@ Green component of the diffuse color between [0.0, 1.0]. */ @@ -174,6 +185,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; const; params { @out Evas_Real r; /*@ Red component of the diffuse color between [0.0, 1.0]. */ @@ -191,6 +203,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; params { @in Evas_Real r; /*@ Red component of the specular color between [0.0, 1.0]. */ @in Evas_Real g; /*@ Green component of the specular color between [0.0, 1.0]. */ @@ -206,6 +219,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; const; params { @out Evas_Real r; /*@ Red component of the specular color between [0.0, 1.0]. */ @@ -231,6 +245,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; params { @in Evas_Real constant; /*@ Constant attenuation term..*/ @in Evas_Real linear; /*@ Linear attenuation term..*/ @@ -246,6 +261,7 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Light */ + legacy null; const; params { @out Evas_Real constant; /*@ Constant attenuation term..*/ @@ -258,8 +274,8 @@ class EO_Evas_3D_LIGHT (EO_Evas_3D_Object, Evas_Common_Interface) implements { Eo_Base::constructor; Eo_Base::destructor; - EO_Evas_3D_Object::update_notify; - EO_Evas_3D_Object::change_notify; + Evas_3D_Object::update_notify; + Evas_3D_Object::change_notify; } } diff --git a/src/lib/evas/canvas/evas_3d_material.c b/src/lib/evas/canvas/evas_3d_material.c index d493cdbe9c..d706f23df4 100644 --- a/src/lib/evas/canvas/evas_3d_material.c +++ b/src/lib/evas/canvas/evas_3d_material.c @@ -8,26 +8,26 @@ #include "Eo.h" -#define MY_CLASS EO_EVAS_3D_MATERIAL_CLASS +#define MY_CLASS EVAS_3D_MATERIAL_CLASS static Eina_Bool _material_mesh_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data EINA_UNUSED, void *fdata) { Evas_3D_Mesh *m = *(Evas_3D_Mesh **)key; - evas_3d_object_change(m, EVAS_3D_STATE_MESH_MATERIAL, (Evas_3D_Object *)fdata); + eo_do(m, evas_3d_object_change(EVAS_3D_STATE_MESH_MATERIAL, (Evas_3D_Object *)fdata)); return EINA_TRUE; } EOLIAN static void -_eo_evas_3d_material_eo_evas_3d_object_change_notify(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) +_evas_3d_material_evas_3d_object_change_notify(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) { if (pd->meshes) eina_hash_foreach(pd->meshes, _material_mesh_change_notify, obj); } EOLIAN static void -_eo_evas_3d_material_eo_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd) +_evas_3d_material_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd) { int i; for (i = 0; i < EVAS_3D_MATERIAL_ATTRIB_COUNT; i++) @@ -36,7 +36,7 @@ _eo_evas_3d_material_eo_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3 { if (pd->attribs[i].texture) { - evas_3d_object_update(pd->attribs[i].texture); + eo_do(pd->attribs[i].texture, evas_3d_object_update()); } } } @@ -97,10 +97,10 @@ evas_3d_material_add(Evas *e) } EOLIAN static void -_eo_evas_3d_material_eo_base_constructor(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd) +_evas_3d_material_eo_base_constructor(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd) { eo_do_super(obj, MY_CLASS, eo_constructor()); - eo_do(obj, eo_evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_MATERIAL)); + eo_do(obj, evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_MATERIAL)); evas_color_set(&pd->attribs[EVAS_3D_MATERIAL_AMBIENT].color, 0.2, 0.2, 0.2, 1.0); evas_color_set(&pd->attribs[EVAS_3D_MATERIAL_DIFFUSE].color, 0.8, 0.8, 0.8, 1.0); @@ -110,7 +110,7 @@ _eo_evas_3d_material_eo_base_constructor(Eo *obj EINA_UNUSED, Evas_3D_Material_D } EOLIAN static void -_eo_evas_3d_material_eo_base_destructor(Eo *obj, Evas_3D_Material_Data *pd) +_evas_3d_material_eo_base_destructor(Eo *obj, Evas_3D_Material_Data *pd) { int i; @@ -128,26 +128,26 @@ _eo_evas_3d_material_eo_base_destructor(Eo *obj, Evas_3D_Material_Data *pd) } EOLIAN static void -_eo_evas_3d_material_enable_set(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Eina_Bool enable) +_evas_3d_material_enable_set(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Eina_Bool enable) { pd->attribs[attrib].enable = enable; } EOLIAN static Eina_Bool -_eo_evas_3d_material_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib) +_evas_3d_material_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib) { return pd->attribs[attrib].enable; } EOLIAN static void -_eo_evas_3d_material_color_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) +_evas_3d_material_color_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) { evas_color_set(&pd->attribs[attrib].color, r, g, b, a); - evas_3d_object_change(obj, EVAS_3D_STATE_MATERIAL_COLOR, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MATERIAL_COLOR, NULL)); } EOLIAN static void -_eo_evas_3d_material_color_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) +_evas_3d_material_color_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) { if (r) *r = pd->attribs[attrib].color.r; if (g) *g = pd->attribs[attrib].color.g; @@ -156,19 +156,19 @@ _eo_evas_3d_material_color_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, E } EOLIAN static void -_eo_evas_3d_material_shininess_set(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_Real shininess) +_evas_3d_material_shininess_set(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_Real shininess) { pd->shininess = shininess; } EOLIAN static Evas_Real -_eo_evas_3d_material_shininess_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd) +_evas_3d_material_shininess_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd) { return pd->shininess; } EOLIAN static void -_eo_evas_3d_material_texture_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_3D_Texture *texture) +_evas_3d_material_texture_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib, Evas_3D_Texture *texture) { if (pd->attribs[attrib].texture != texture) { @@ -183,11 +183,11 @@ _eo_evas_3d_material_texture_set(Eo *obj, Evas_3D_Material_Data *pd, Evas_3D_Mat eo_ref(texture); } - evas_3d_object_change(obj, EVAS_3D_STATE_MATERIAL_TEXTURE, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MATERIAL_TEXTURE, NULL)); } EOLIAN static Evas_3D_Texture * -_eo_evas_3d_material_texture_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib) +_evas_3d_material_texture_get(Eo *obj EINA_UNUSED, Evas_3D_Material_Data *pd, Evas_3D_Material_Attrib attrib) { return pd->attribs[attrib].texture; } diff --git a/src/lib/evas/canvas/evas_3d_material.eo b/src/lib/evas/canvas/evas_3d_material.eo index 38933d663f..52d96aebf8 100644 --- a/src/lib/evas/canvas/evas_3d_material.eo +++ b/src/lib/evas/canvas/evas_3d_material.eo @@ -1,4 +1,4 @@ -class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) +class Evas_3D_Material (Evas_3D_Object, Evas_Common_Interface) { legacy_prefix: evas_3d_material; data: Evas_3D_Material_Data; @@ -23,6 +23,7 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Material */ + legacy null; params { @in Evas_3D_Material_Attrib attrib; /*@ Material attribute ID. */ @in Evas_Real r; /*@ Red component of the color. */ @@ -41,6 +42,7 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Material */ + legacy null; const; params { @in Evas_3D_Material_Attrib attrib; /*@ Material attribute ID. */ @@ -66,6 +68,7 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Material */ + legacy null; } get { /* @@ -76,6 +79,7 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) @return @c EINA_TRUE if enabled, or @c EINA_FALSE if not. @ingroup Evas_3D_Material */ + legacy null; } keys { Evas_3D_Material_Attrib attrib; /*@ Material attribute ID. */ @@ -99,6 +103,7 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Material */ + legacy null; } get { /* @@ -109,6 +114,7 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) @return The shininess value. @ingroup Evas_3D_Material */ + legacy null; } values { Evas_Real shininess; /*@ Shininess value. */ @@ -126,6 +132,7 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Material */ + legacy null; } get { /* @@ -137,6 +144,7 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Material */ + legacy null; } keys { @@ -150,8 +158,8 @@ class EO_Evas_3D_Material (EO_Evas_3D_Object, Evas_Common_Interface) implements { Eo_Base::constructor; Eo_Base::destructor; - EO_Evas_3D_Object::update_notify; - EO_Evas_3D_Object::change_notify; + Evas_3D_Object::update_notify; + Evas_3D_Object::change_notify; } } diff --git a/src/lib/evas/canvas/evas_3d_mesh.c b/src/lib/evas/canvas/evas_3d_mesh.c index fc11d4557e..4007145680 100644 --- a/src/lib/evas/canvas/evas_3d_mesh.c +++ b/src/lib/evas/canvas/evas_3d_mesh.c @@ -8,7 +8,7 @@ #include "Eo.h" -#define MY_CLASS EO_EVAS_3D_MESH_CLASS +#define MY_CLASS EVAS_3D_MESH_CLASS static Evas_3D_Mesh_Frame * evas_3d_mesh_frame_new(Evas_3D_Mesh *mesh) @@ -107,7 +107,7 @@ _mesh_node_geometry_change_notify(const Eina_Hash *hash EINA_UNUSED, const void void *data EINA_UNUSED, void *fdata) { Evas_3D_Node *n = *(Evas_3D_Node **)key; - evas_3d_object_change(n, EVAS_3D_STATE_NODE_MESH_GEOMETRY, (Evas_3D_Object *)fdata); + eo_do(n, evas_3d_object_change(EVAS_3D_STATE_NODE_MESH_GEOMETRY, (Evas_3D_Object *)fdata)); return EINA_TRUE; } @@ -116,12 +116,12 @@ _mesh_node_material_change_notify(const Eina_Hash *hash EINA_UNUSED, const void void *data EINA_UNUSED, void *fdata) { Evas_3D_Node *n = *(Evas_3D_Node **)key; - evas_3d_object_change(n, EVAS_3D_STATE_NODE_MESH_MATERIAL, (Evas_3D_Object *)fdata); + eo_do(n, evas_3d_object_change(EVAS_3D_STATE_NODE_MESH_MATERIAL, (Evas_3D_Object *)fdata)); return EINA_TRUE; } static void -_eo_evas_3d_mesh_eo_evas_3d_object_change_notify(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_State state, Evas_3D_Object *ref EINA_UNUSED) +_evas_3d_mesh_evas_3d_object_change_notify(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_State state, Evas_3D_Object *ref EINA_UNUSED) { if (state == EVAS_3D_STATE_MESH_MATERIAL) { @@ -136,7 +136,7 @@ _eo_evas_3d_mesh_eo_evas_3d_object_change_notify(Eo *obj, Evas_3D_Mesh_Data *pd, } EOLIAN static void -_eo_evas_3d_mesh_eo_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { Eina_List *l; Evas_3D_Mesh_Frame *f; @@ -145,7 +145,7 @@ _eo_evas_3d_mesh_eo_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Me { if (f->material) { - evas_3d_object_update(f->material); + eo_do(f->material, evas_3d_object_update()); } } } @@ -204,51 +204,51 @@ evas_3d_mesh_add(Evas *e) } EOLIAN static void -_eo_evas_3d_mesh_eo_base_constructor(Eo *obj, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_eo_base_constructor(Eo *obj, Evas_3D_Mesh_Data *pd) { eo_do_super(obj, MY_CLASS, eo_constructor()); - eo_do (obj, eo_evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_MESH)); + eo_do (obj, evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_MESH)); _mesh_init(pd); } EOLIAN static void -_eo_evas_3d_mesh_eo_base_destructor(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_eo_base_destructor(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { //evas_3d_object_unreference(&pd->base); _mesh_fini(pd); } EOLIAN static void -_eo_evas_3d_mesh_shade_mode_set(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, Evas_3D_Shade_Mode mode) +_evas_3d_mesh_shade_mode_set(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, Evas_3D_Shade_Mode mode) { if (pd->shade_mode != mode) { pd->shade_mode = mode; - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_SHADE_MODE, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_SHADE_MODE, NULL)); } } EOLIAN static Evas_3D_Shade_Mode -_eo_evas_3d_mesh_shade_mode_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_shade_mode_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { return pd->shade_mode; } EOLIAN static void -_eo_evas_3d_mesh_vertex_count_set(Eo *obj, Evas_3D_Mesh_Data *pd, unsigned int count) +_evas_3d_mesh_vertex_count_set(Eo *obj, Evas_3D_Mesh_Data *pd, unsigned int count) { pd->vertex_count = count; - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_VERTEX_COUNT, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_VERTEX_COUNT, NULL)); } EOLIAN static int -_eo_evas_3d_mesh_vertex_count_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_vertex_count_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { return pd->vertex_count; } EOLIAN static void -_eo_evas_3d_mesh_frame_add(Eo *obj, Evas_3D_Mesh_Data *pd, int frame) +_evas_3d_mesh_frame_add(Eo *obj, Evas_3D_Mesh_Data *pd, int frame) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); @@ -265,11 +265,11 @@ _eo_evas_3d_mesh_frame_add(Eo *obj, Evas_3D_Mesh_Data *pd, int frame) f->frame = frame; pd->frames = eina_list_append(pd->frames, f); - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_FRAME, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_FRAME, NULL)); } EOLIAN static void -_eo_evas_3d_mesh_frame_del(Eo *obj, Evas_3D_Mesh_Data *pd, int frame) +_evas_3d_mesh_frame_del(Eo *obj, Evas_3D_Mesh_Data *pd, int frame) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); @@ -281,11 +281,11 @@ _eo_evas_3d_mesh_frame_del(Eo *obj, Evas_3D_Mesh_Data *pd, int frame) pd->frames = eina_list_remove(pd->frames, f); evas_3d_mesh_frame_free(f); - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_FRAME, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_FRAME, NULL)); } EOLIAN static void -_eo_evas_3d_mesh_frame_material_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Material *material) +_evas_3d_mesh_frame_material_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Material *material) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); @@ -306,12 +306,12 @@ _eo_evas_3d_mesh_frame_material_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, E f->material = material; eo_ref(material); - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_MATERIAL, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_MATERIAL, NULL)); evas_3d_material_mesh_add(material, obj); } EOLIAN static Evas_3D_Material * -_eo_evas_3d_mesh_frame_material_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, int frame) +_evas_3d_mesh_frame_material_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, int frame) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); @@ -325,7 +325,7 @@ _eo_evas_3d_mesh_frame_material_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, } EOLIAN static void -_eo_evas_3d_mesh_frame_vertex_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data) +_evas_3d_mesh_frame_vertex_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); int element_count; @@ -371,11 +371,11 @@ _eo_evas_3d_mesh_frame_vertex_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame f->vertices[attrib].owns_data = EINA_FALSE; f->vertices[attrib].element_count = element_count; - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_VERTEX_DATA, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_VERTEX_DATA, NULL)); } EOLIAN static void -_eo_evas_3d_mesh_frame_vertex_data_copy_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data) +_evas_3d_mesh_frame_vertex_data_copy_set(Eo *obj, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib, int stride, const void *data) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); Evas_3D_Vertex_Buffer *vb; @@ -498,11 +498,11 @@ _eo_evas_3d_mesh_frame_vertex_data_copy_set(Eo *obj, Evas_3D_Mesh_Data *pd, int } } - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_VERTEX_DATA, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_VERTEX_DATA, NULL)); } EOLIAN static void * -_eo_evas_3d_mesh_frame_vertex_data_map(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib) +_evas_3d_mesh_frame_vertex_data_map(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); @@ -523,7 +523,7 @@ _eo_evas_3d_mesh_frame_vertex_data_map(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *p } EOLIAN static void -_eo_evas_3d_mesh_frame_vertex_data_unmap(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib) +_evas_3d_mesh_frame_vertex_data_unmap(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); @@ -543,7 +543,7 @@ _eo_evas_3d_mesh_frame_vertex_data_unmap(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data } EOLIAN static int -_eo_evas_3d_mesh_frame_vertex_stride_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib) +_evas_3d_mesh_frame_vertex_stride_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, int frame, Evas_3D_Vertex_Attrib attrib) { Evas_3D_Mesh_Frame *f = evas_3d_mesh_frame_find(pd, frame); @@ -557,7 +557,7 @@ _eo_evas_3d_mesh_frame_vertex_stride_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data } EOLIAN static void -_eo_evas_3d_mesh_index_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Index_Format format, int count, const void *indices) +_evas_3d_mesh_index_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Index_Format format, int count, const void *indices) { if (pd->owns_indices && pd->indices) free(pd->indices); @@ -568,11 +568,11 @@ _eo_evas_3d_mesh_index_data_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Index_Fo pd->indices = (void *)indices; pd->owns_indices = EINA_FALSE; - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_INDEX_DATA, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_INDEX_DATA, NULL)); } EOLIAN static void -_eo_evas_3d_mesh_index_data_copy_set(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, Evas_3D_Index_Format format, int count, const void *indices) +_evas_3d_mesh_index_data_copy_set(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, Evas_3D_Index_Format format, int count, const void *indices) { int size; @@ -615,19 +615,19 @@ _eo_evas_3d_mesh_index_data_copy_set(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd, } EOLIAN static Evas_3D_Index_Format -_eo_evas_3d_mesh_index_format_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_index_format_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { return pd->index_format; } EOLIAN static int -_eo_evas_3d_mesh_index_count_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_index_count_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { return pd->index_count; } EOLIAN static void * -_eo_evas_3d_mesh_index_data_map(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_index_data_map(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { if (pd->index_mapped) { @@ -640,7 +640,7 @@ _eo_evas_3d_mesh_index_data_map(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) } EOLIAN static void -_eo_evas_3d_mesh_index_data_unmap(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_index_data_unmap(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { if (!pd->index_mapped) { @@ -652,20 +652,20 @@ _eo_evas_3d_mesh_index_data_unmap(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) } EOLIAN static void -_eo_evas_3d_mesh_vertex_assembly_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Vertex_Assembly assembly) +_evas_3d_mesh_vertex_assembly_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Vertex_Assembly assembly) { pd->assembly = assembly; - evas_3d_object_change(obj, EVAS_3D_STATE_MESH_VERTEX_ASSEMBLY, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_VERTEX_ASSEMBLY, NULL)); } EOLIAN static Evas_3D_Vertex_Assembly -_eo_evas_3d_mesh_vertex_assembly_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) +_evas_3d_mesh_vertex_assembly_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd) { return pd->assembly; } EOLIAN static void -_eo_evas_3d_mesh_file_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Mesh_File_Type type, const char *file, const char *key EINA_UNUSED) +_evas_3d_mesh_file_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Mesh_File_Type type, const char *file, const char *key EINA_UNUSED) { _mesh_fini(pd); _mesh_init(pd); diff --git a/src/lib/evas/canvas/evas_3d_mesh.eo b/src/lib/evas/canvas/evas_3d_mesh.eo index 9ca5aeda0d..e861fd08f8 100644 --- a/src/lib/evas/canvas/evas_3d_mesh.eo +++ b/src/lib/evas/canvas/evas_3d_mesh.eo @@ -1,4 +1,4 @@ -class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) +class Evas_3D_Mesh (Evas_3D_Object, Evas_Common_Interface) { legacy_prefix: evas_3d_mesh; data: Evas_3D_Mesh_Data; @@ -13,6 +13,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) * * @ingroup Evas_3D_Mesh */ + legacy null; params { @in Evas_3D_Mesh_File_Type type; /*@ The type of the mesh file. */ @in const char *file; /*@ Path to the mesh file. */ @@ -37,6 +38,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; params { @in int frame; /*@ The number of the key frame. */ @in Evas_3D_Vertex_Attrib attrib; /*@ Vertex attribute ID. */ @@ -59,6 +61,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; params { @in int frame; /*@ The number of the key frame. */ @in Evas_3D_Vertex_Attrib attrib; /*@ Vertex attribute ID. */ @@ -83,6 +86,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; return void *; params { @in int frame; /*@ The number of the key frame. */ @@ -99,6 +103,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; params { @in int frame; /*@ The number of the key frame. */ @in Evas_3D_Vertex_Attrib attrib; /*@ Vertex attribute ID. */ @@ -119,6 +124,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; const; return int ; params { @@ -141,6 +147,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; params { @in Evas_3D_Index_Format format; /*@ Vertex index data format. */ @in int count; /*@ Vertex index count. */ @@ -160,6 +167,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; return void ; params { @in Evas_3D_Index_Format format; /*@ Vertex index data format. */ @@ -185,6 +193,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; const; return Evas_3D_Index_Format ; } @@ -202,6 +211,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; const; return int ; } @@ -221,6 +231,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; return void * ; } @@ -232,6 +243,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; } frame_add { @@ -245,6 +257,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; params { @in int frame; /*@ The number of the key frame to be added. */ } @@ -261,6 +274,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; params { @in int frame; /*@ The number of the key frame to be added. */ } @@ -278,6 +292,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; params { @in unsigned int count; /*@ Vertex count.*/ } @@ -291,6 +306,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; const; return int; } @@ -306,6 +322,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) * * @ingroup Evas_3D_Mesh */ + legacy null; } get { /** @@ -315,6 +332,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) * * @ingroup Evas_3D_Mesh */ + legacy null; } values { Evas_3D_Shade_Mode mode; /*@ The shade mode.*/ @@ -331,6 +349,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; } get { /** @@ -340,6 +359,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; } keys { int frame; /*@ The number of the key frame.*/ @@ -361,6 +381,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; } get { /* @@ -372,6 +393,7 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Mesh */ + legacy null; } values { Evas_3D_Vertex_Assembly assembly; /*@ Vertex assembly.*/ @@ -382,8 +404,8 @@ class EO_Evas_3D_Mesh (EO_Evas_3D_Object, Evas_Common_Interface) implements { Eo_Base::constructor; Eo_Base::destructor; - EO_Evas_3D_Object::update_notify; - EO_Evas_3D_Object::change_notify; + Evas_3D_Object::update_notify; + Evas_3D_Object::change_notify; } } diff --git a/src/lib/evas/canvas/evas_3d_mesh_loader_md2.c b/src/lib/evas/canvas/evas_3d_mesh_loader_md2.c index 7472e27267..132a9292fe 100644 --- a/src/lib/evas/canvas/evas_3d_mesh_loader_md2.c +++ b/src/lib/evas/canvas/evas_3d_mesh_loader_md2.c @@ -366,8 +366,9 @@ evas_3d_mesh_file_md2_set(Evas_3D_Mesh *mesh, const char *file) s_scale = 1.0 / (float)(loader.skin_width - 1); t_scale = 1.0 / (float)(loader.skin_height - 1); - evas_3d_mesh_vertex_count_set(mesh, loader.triangle_count * 3); - evas_3d_mesh_vertex_assembly_set(mesh, EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES); + eo_do(mesh, + evas_3d_mesh_vertex_count_set(loader.triangle_count * 3), + evas_3d_mesh_vertex_assembly_set(EVAS_3D_VERTEX_ASSEMBLY_TRIANGLES)); /* Load frames */ for (i = 0; i < loader.frame_count; i++) @@ -375,22 +376,23 @@ evas_3d_mesh_file_md2_set(Evas_3D_Mesh *mesh, const char *file) const MD2_Frame *frame = (const MD2_Frame *)(loader.frames + loader.frame_size * i); int f = i * MD2_FRAME_SCALE; - /* Add a mesh frame. */ - evas_3d_mesh_frame_add(mesh, f); + eo_do(mesh, + /* Add a mesh frame. */ + evas_3d_mesh_frame_add(f), - /* Allocate vertex buffer for the frame. */ - evas_3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_3D_VERTEX_POSITION, 0, NULL); - evas_3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_3D_VERTEX_NORMAL, 0, NULL); - evas_3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_3D_VERTEX_TEXCOORD, 0, NULL); + /* Allocate vertex buffer for the frame. */ + evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_POSITION, 0, NULL), + evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_NORMAL, 0, NULL), + evas_3d_mesh_frame_vertex_data_copy_set(f, EVAS_3D_VERTEX_TEXCOORD, 0, NULL), - /* Map vertex buffer. */ - pos = (float *)evas_3d_mesh_frame_vertex_data_map(mesh, f, EVAS_3D_VERTEX_POSITION); - nor = (float *)evas_3d_mesh_frame_vertex_data_map(mesh, f, EVAS_3D_VERTEX_NORMAL); - tex = (float *)evas_3d_mesh_frame_vertex_data_map(mesh, f, EVAS_3D_VERTEX_TEXCOORD); + /* Map vertex buffer. */ + pos = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_POSITION), + nor = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_NORMAL), + tex = (float *)evas_3d_mesh_frame_vertex_data_map(f, EVAS_3D_VERTEX_TEXCOORD), - stride_pos = evas_3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_3D_VERTEX_POSITION); - stride_nor = evas_3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_3D_VERTEX_NORMAL); - stride_tex = evas_3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_3D_VERTEX_TEXCOORD); + stride_pos = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_POSITION), + stride_nor = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_NORMAL), + stride_tex = evas_3d_mesh_frame_vertex_stride_get(f, EVAS_3D_VERTEX_TEXCOORD)); if (stride_pos == 0) stride_pos = sizeof(float) * 3; @@ -431,9 +433,10 @@ evas_3d_mesh_file_md2_set(Evas_3D_Mesh *mesh, const char *file) } /* Unmap vertex buffer. */ - evas_3d_mesh_frame_vertex_data_unmap(mesh, f, EVAS_3D_VERTEX_POSITION); - evas_3d_mesh_frame_vertex_data_unmap(mesh, f, EVAS_3D_VERTEX_NORMAL); - evas_3d_mesh_frame_vertex_data_unmap(mesh, f, EVAS_3D_VERTEX_TEXCOORD); + eo_do(mesh, + evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_POSITION), + evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_NORMAL), + evas_3d_mesh_frame_vertex_data_unmap(f, EVAS_3D_VERTEX_TEXCOORD)); } _md2_loader_fini(&loader); diff --git a/src/lib/evas/canvas/evas_3d_node.c b/src/lib/evas/canvas/evas_3d_node.c index 02b8567d3c..b978da8798 100644 --- a/src/lib/evas/canvas/evas_3d_node.c +++ b/src/lib/evas/canvas/evas_3d_node.c @@ -8,7 +8,7 @@ #include "Eo.h" -#define MY_CLASS EO_EVAS_3D_NODE_CLASS +#define MY_CLASS EVAS_3D_NODE_CLASS #define MY_CLASS_NAME "Evas_3D_Node" static inline Evas_3D_Node_Mesh * @@ -46,7 +46,7 @@ _node_scene_root_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *ke void *data EINA_UNUSED, void *fdata) { Evas_3D_Scene *s = *(Evas_3D_Scene **)key; - evas_3d_object_change(s, EVAS_3D_STATE_SCENE_ROOT_NODE, (Evas_3D_Object *)fdata); + eo_do(s, evas_3d_object_change(EVAS_3D_STATE_SCENE_ROOT_NODE, (Evas_3D_Object *)fdata)); return EINA_TRUE; } @@ -55,12 +55,12 @@ _node_scene_camera_change_notify(const Eina_Hash *hash EINA_UNUSED, const void * void *data EINA_UNUSED, void *fdata) { Evas_3D_Scene *s = *(Evas_3D_Scene **)key; - evas_3d_object_change(s, EVAS_3D_STATE_SCENE_CAMERA_NODE, (Evas_3D_Object *)fdata); + eo_do(s, evas_3d_object_change(EVAS_3D_STATE_SCENE_CAMERA_NODE, (Evas_3D_Object *)fdata)); return EINA_TRUE; } EOLIAN static void -_eo_evas_3d_node_eo_evas_3d_object_change_notify(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_State state EINA_UNUSED , Evas_3D_Object *ref EINA_UNUSED) +_evas_3d_node_evas_3d_object_change_notify(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_State state EINA_UNUSED , Evas_3D_Object *ref EINA_UNUSED) { Eina_List *l; Evas_3D_Node *n; @@ -75,13 +75,13 @@ _eo_evas_3d_node_eo_evas_3d_object_change_notify(Eo *obj, Evas_3D_Node_Data *pd, /* Notify parent that a member has changed. */ if (pd->parent) { - evas_3d_object_change(pd->parent, EVAS_3D_STATE_NODE_MEMBER, obj); + eo_do(pd->parent, evas_3d_object_change(EVAS_3D_STATE_NODE_MEMBER, obj)); } /* Notify members that the parent has changed. */ EINA_LIST_FOREACH(pd->members, l, n) { - evas_3d_object_change(n, EVAS_3D_STATE_NODE_PARENT, obj); + eo_do(n, evas_3d_object_change(EVAS_3D_STATE_NODE_PARENT, obj)); } } @@ -89,8 +89,13 @@ static Eina_Bool _node_transform_update(Evas_3D_Node *node, void *data EINA_UNUSED) { Evas_3D_Node_Data *pd = eo_data_scope_get(node, MY_CLASS); - if (evas_3d_object_dirty_get(node, EVAS_3D_STATE_NODE_TRANSFORM) || - evas_3d_object_dirty_get(node, EVAS_3D_STATE_NODE_PARENT)) + Eina_Bool transform_dirty = EINA_FALSE, parent_dirty = EINA_FALSE; + + eo_do(node, + transform_dirty = evas_3d_object_dirty_get(EVAS_3D_STATE_NODE_TRANSFORM), + parent_dirty = evas_3d_object_dirty_get(EVAS_3D_STATE_NODE_PARENT)); + + if (transform_dirty || parent_dirty) { if (pd->parent) { @@ -169,19 +174,19 @@ _node_transform_update(Evas_3D_Node *node, void *data EINA_UNUSED) static Eina_Bool _node_item_update(Evas_3D_Node *node, void *data EINA_UNUSED) { - Evas_3D_Node_Data *pd = eo_data_scope_get(node, EO_EVAS_3D_NODE_CLASS); + Evas_3D_Node_Data *pd = eo_data_scope_get(node, EVAS_3D_NODE_CLASS); if (pd->type == EVAS_3D_NODE_TYPE_CAMERA) { if (pd->data.camera.camera) { - evas_3d_object_update(pd->data.camera.camera); + eo_do(pd->data.camera.camera, evas_3d_object_update()); } } else if (pd->type == EVAS_3D_NODE_TYPE_LIGHT) { if (pd->data.light.light) { - evas_3d_object_update(pd->data.light.light); + eo_do(pd->data.light.light, evas_3d_object_update()); } } else if (pd->type == EVAS_3D_NODE_TYPE_MESH) @@ -190,7 +195,7 @@ _node_item_update(Evas_3D_Node *node, void *data EINA_UNUSED) Evas_3D_Mesh *m; EINA_LIST_FOREACH(pd->data.mesh.meshes, l, m) { - evas_3d_object_update(m); + eo_do(m, evas_3d_object_update()); } } @@ -200,11 +205,20 @@ _node_item_update(Evas_3D_Node *node, void *data EINA_UNUSED) static Eina_Bool _node_aabb_update(Evas_3D_Node *node, void *data EINA_UNUSED) { - Evas_3D_Node_Data *pd = eo_data_scope_get(node, EO_EVAS_3D_NODE_CLASS); - if (evas_3d_object_dirty_get(node, EVAS_3D_STATE_NODE_TRANSFORM) || - evas_3d_object_dirty_get(node, EVAS_3D_STATE_NODE_MESH_GEOMETRY) || - evas_3d_object_dirty_get(node, EVAS_3D_STATE_NODE_MESH_FRAME) || - evas_3d_object_dirty_get(node, EVAS_3D_STATE_NODE_MEMBER)) + Evas_3D_Node_Data *pd = eo_data_scope_get(node, EVAS_3D_NODE_CLASS); + Eina_Bool transform_dirty = EINA_FALSE, mesh_geom_dirty = EINA_FALSE, + mesh_frame_dirty = EINA_FALSE, member_dirty = EINA_FALSE; + + eo_do(node, + transform_dirty = evas_3d_object_dirty_get(EVAS_3D_STATE_NODE_TRANSFORM), + mesh_geom_dirty = evas_3d_object_dirty_get(EVAS_3D_STATE_NODE_MESH_GEOMETRY), + mesh_frame_dirty = evas_3d_object_dirty_get(EVAS_3D_STATE_NODE_MESH_FRAME), + member_dirty = evas_3d_object_dirty_get(EVAS_3D_STATE_NODE_MEMBER)); + + if (transform_dirty || + mesh_geom_dirty || + mesh_frame_dirty || + member_dirty) { Eina_List *l; Evas_3D_Node *n; @@ -214,7 +228,7 @@ _node_aabb_update(Evas_3D_Node *node, void *data EINA_UNUSED) EINA_LIST_FOREACH(pd->members, l, n) { - Evas_3D_Node_Data *pdmember = eo_data_scope_get(n, EO_EVAS_3D_NODE_CLASS); + Evas_3D_Node_Data *pdmember = eo_data_scope_get(n, EVAS_3D_NODE_CLASS); evas_box3_union(&pd->aabb, &pd->aabb, &pdmember->aabb); } @@ -231,13 +245,13 @@ static Eina_Bool _node_update_done(Evas_3D_Node *obj, void *data EINA_UNUSED) { //@FIXME - Evas_3D_Object_Data *pdobject = eo_data_scope_get(obj, EO_EVAS_3D_OBJECT_CLASS); + Evas_3D_Object_Data *pdobject = eo_data_scope_get(obj, EVAS_3D_OBJECT_CLASS); memset(&pdobject->dirty[0], 0x00, sizeof(Eina_Bool) * EVAS_3D_STATE_MAX); return EINA_TRUE; } EOLIAN static void -_eo_evas_3d_node_eo_evas_3d_object_update_notify(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED) +_evas_3d_node_evas_3d_object_update_notify(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED) { /* Update transform. */ evas_3d_node_tree_traverse(obj, EVAS_3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_FALSE, @@ -614,17 +628,17 @@ evas_3d_node_add(Evas *e, Evas_3D_Node_Type type) MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); - Evas_Object *eo_obj = eo_add_custom(MY_CLASS, e, eo_evas_3d_node_constructor(type)); + Evas_Object *eo_obj = eo_add_custom(MY_CLASS, e, evas_3d_node_constructor(type)); eo_unref(eo_obj); return eo_obj; } EOLIAN static void -_eo_evas_3d_node_constructor(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node_Type type) +_evas_3d_node_constructor(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node_Type type) { eo_do_super(obj, MY_CLASS, eo_constructor()); - eo_do(obj, eo_evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_NODE)); + eo_do(obj, evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_NODE)); evas_vec3_set(&pd->position, 0.0, 0.0, 0.0); evas_vec4_set(&pd->orientation, 0.0, 0.0, 0.0, 0.0); @@ -655,26 +669,26 @@ _eo_evas_3d_node_constructor(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node_Type t } EOLIAN static void -_eo_evas_3d_node_eo_base_constructor(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED) +_evas_3d_node_eo_base_constructor(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED) { eo_error_set(obj); ERR("only custom constructor can be used with '%s' class", MY_CLASS_NAME); } EOLIAN static void -_eo_evas_3d_node_eo_base_destructor(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED) +_evas_3d_node_eo_base_destructor(Eo *obj, Evas_3D_Node_Data *pd EINA_UNUSED) { eo_unref(obj); } EOLIAN static Evas_3D_Node_Type -_eo_evas_3d_node_type_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_type_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->type; } EOLIAN static void -_eo_evas_3d_node_member_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member) +_evas_3d_node_member_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member) { if (obj == member) { @@ -692,7 +706,7 @@ _eo_evas_3d_node_member_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member pdmemberparent->members = eina_list_remove(pdmemberparent->members, member); /* Mark changed. */ - evas_3d_object_change(pdmember->parent, EVAS_3D_STATE_NODE_MEMBER, NULL); + eo_do(pdmember->parent, evas_3d_object_change(EVAS_3D_STATE_NODE_MEMBER, NULL)); } else { @@ -705,12 +719,12 @@ _eo_evas_3d_node_member_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member pdmember->parent = obj; /* Mark changed. */ - evas_3d_object_change(member, EVAS_3D_STATE_NODE_PARENT, NULL); - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_MEMBER, NULL); + eo_do(member, evas_3d_object_change(EVAS_3D_STATE_NODE_PARENT, NULL)); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_MEMBER, NULL)); } EOLIAN static void -_eo_evas_3d_node_member_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member) +_evas_3d_node_member_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member) { Evas_3D_Node_Data *pdmember = eo_data_scope_get(member, MY_CLASS); if (pdmember->parent != obj) @@ -724,48 +738,48 @@ _eo_evas_3d_node_member_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member pdmember->parent = NULL; /* Mark modified object as changed. */ - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_MEMBER, NULL); - evas_3d_object_change(member, EVAS_3D_STATE_NODE_PARENT, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_MEMBER, NULL)); + eo_do(member, evas_3d_object_change(EVAS_3D_STATE_NODE_PARENT, NULL)); /* Decrease reference count. */ eo_unref(member); } EOLIAN static Evas_3D_Node * -_eo_evas_3d_node_parent_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_parent_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->parent; } EOLIAN static const Eina_List * -_eo_evas_3d_node_member_list_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_member_list_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->members; } EOLIAN static void -_eo_evas_3d_node_position_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z) +_evas_3d_node_position_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z) { pd->position.x = x; pd->position.y = y; pd->position.z = z; - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_TRANSFORM, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM, NULL)); } EOLIAN static void -_eo_evas_3d_node_orientation_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z, Evas_Real w) +_evas_3d_node_orientation_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z, Evas_Real w) { pd->orientation.x = x; pd->orientation.y = y; pd->orientation.z = z; pd->orientation.w = w; - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_TRANSFORM, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM, NULL)); } EOLIAN static void -_eo_evas_3d_node_orientation_angle_axis_set(Eo *obj, Evas_3D_Node_Data *pd, +_evas_3d_node_orientation_angle_axis_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real angle, Evas_Real x, Evas_Real y, Evas_Real z) { Evas_Real half_angle = 0.5 * DEGREE_TO_RADIAN(angle); @@ -780,21 +794,21 @@ _eo_evas_3d_node_orientation_angle_axis_set(Eo *obj, Evas_3D_Node_Data *pd, pd->orientation.y = s * axis.y; pd->orientation.z = s * axis.z; - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_TRANSFORM, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM, NULL)); } EOLIAN static void -_eo_evas_3d_node_scale_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z) +_evas_3d_node_scale_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_Real x, Evas_Real y, Evas_Real z) { pd->scale.x = x; pd->scale.y = y; pd->scale.z = z; - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_TRANSFORM, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM, NULL)); } EOLIAN static void -_eo_evas_3d_node_position_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space, +_evas_3d_node_position_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z) { if (space == EVAS_3D_SPACE_LOCAL) @@ -811,7 +825,7 @@ _eo_evas_3d_node_position_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space spac } else if (space == EVAS_3D_SPACE_WORLD) { - evas_3d_object_update(obj); + eo_do(obj, evas_3d_object_update()); if (x) *x = pd->position_world.x; if (y) *y = pd->position_world.y; @@ -820,7 +834,7 @@ _eo_evas_3d_node_position_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space spac } EOLIAN static void -_eo_evas_3d_node_orientation_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space, +_evas_3d_node_orientation_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z, Evas_Real *w) { if (space == EVAS_3D_SPACE_LOCAL) @@ -839,7 +853,7 @@ _eo_evas_3d_node_orientation_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space s } else if (space == EVAS_3D_SPACE_WORLD) { - evas_3d_object_update(obj); + eo_do(obj, evas_3d_object_update()); if (x) *x = pd->orientation_world.x; if (y) *y = pd->orientation_world.y; @@ -850,7 +864,7 @@ _eo_evas_3d_node_orientation_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space s } EOLIAN static void -_eo_evas_3d_node_scale_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space, +_evas_3d_node_scale_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space, Evas_Real *x, Evas_Real *y, Evas_Real *z) { if (space == EVAS_3D_SPACE_LOCAL) @@ -867,7 +881,7 @@ _eo_evas_3d_node_scale_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space, } else if (space == EVAS_3D_SPACE_WORLD) { - evas_3d_object_update(obj); + eo_do(obj, evas_3d_object_update()); if (x) *x = pd->scale_world.x; if (y) *y = pd->scale_world.y; @@ -876,46 +890,46 @@ _eo_evas_3d_node_scale_get(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space space, } EOLIAN static void -_eo_evas_3d_node_position_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit) +_evas_3d_node_position_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit) { pd->position_inherit = inherit; - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_TRANSFORM, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM, NULL)); } EOLIAN static void -_eo_evas_3d_node_orientation_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit) +_evas_3d_node_orientation_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit) { pd->orientation_inherit = inherit; - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_TRANSFORM, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM, NULL)); } EOLIAN static void -_eo_evas_3d_node_scale_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit) +_evas_3d_node_scale_inherit_set(Eo *obj, Evas_3D_Node_Data *pd, Eina_Bool inherit) { pd->scale_inherit = inherit; - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_TRANSFORM, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM, NULL)); } EOLIAN static Eina_Bool -_eo_evas_3d_node_position_inherit_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_position_inherit_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->position_inherit; } EOLIAN static Eina_Bool -_eo_evas_3d_node_orientation_inherit_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_orientation_inherit_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->orientation_inherit; } EOLIAN static Eina_Bool -_eo_evas_3d_node_scale_inherit_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_scale_inherit_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->scale_inherit; } EOLIAN static void -_eo_evas_3d_node_look_at_set(Eo *obj, Evas_3D_Node_Data *pd, +_evas_3d_node_look_at_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Space target_space, Evas_Real tx, Evas_Real ty, Evas_Real tz, Evas_3D_Space up_space, Evas_Real ux, Evas_Real uy, Evas_Real uz) { @@ -1021,11 +1035,11 @@ _eo_evas_3d_node_look_at_set(Eo *obj, Evas_3D_Node_Data *pd, pd->orientation.y = (y.z + z.y) * s; } - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_TRANSFORM, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_TRANSFORM, NULL)); } EOLIAN static void -_eo_evas_3d_node_camera_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Camera *camera) +_evas_3d_node_camera_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Camera *camera) { if (pd->type != EVAS_3D_NODE_TYPE_CAMERA) { @@ -1050,17 +1064,17 @@ _eo_evas_3d_node_camera_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Camera *came evas_3d_camera_node_add(camera, obj); /* Mark changed. */ - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_CAMERA, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_CAMERA, NULL)); } EOLIAN static Evas_3D_Camera * -_eo_evas_3d_node_camera_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_camera_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->data.camera.camera; } EOLIAN static void -_eo_evas_3d_node_light_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Light *light) +_evas_3d_node_light_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Light *light) { if (pd->type != EVAS_3D_NODE_TYPE_LIGHT) { @@ -1085,17 +1099,17 @@ _eo_evas_3d_node_light_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Light *light) evas_3d_light_node_add(light, obj); /* Mark changed. */ - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_LIGHT, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_LIGHT, NULL)); } EOLIAN static Evas_3D_Light * -_eo_evas_3d_node_light_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_light_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->data.light.light; } EOLIAN static void -_eo_evas_3d_node_mesh_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh) +_evas_3d_node_mesh_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh) { Evas_3D_Node_Mesh *nm = NULL; @@ -1132,12 +1146,12 @@ _eo_evas_3d_node_mesh_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh) evas_3d_mesh_node_add(mesh, obj); /* Mark changed. */ - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_MESH_GEOMETRY, NULL); - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_MESH_MATERIAL, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_MESH_GEOMETRY, NULL)); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_MESH_MATERIAL, NULL)); } EOLIAN static void -_eo_evas_3d_node_mesh_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh) +_evas_3d_node_mesh_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh) { if (pd->type != EVAS_3D_NODE_TYPE_MESH) { @@ -1155,18 +1169,18 @@ _eo_evas_3d_node_mesh_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh) evas_3d_mesh_node_del(mesh, obj); eo_unref(mesh); - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_MESH_GEOMETRY, NULL); - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_MESH_MATERIAL, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_MESH_GEOMETRY, NULL)); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_MESH_MATERIAL, NULL)); } EOLIAN static const Eina_List * -_eo_evas_3d_node_mesh_list_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) +_evas_3d_node_mesh_list_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd) { return pd->data.mesh.meshes; } EOLIAN static void -_eo_evas_3d_node_mesh_frame_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh, int frame) +_evas_3d_node_mesh_frame_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh, int frame) { Evas_3D_Node_Mesh *nm = NULL; @@ -1183,11 +1197,11 @@ _eo_evas_3d_node_mesh_frame_set(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Mesh *me } nm->frame = frame; - evas_3d_object_change(obj, EVAS_3D_STATE_NODE_MESH_FRAME, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_NODE_MESH_FRAME, NULL)); } EOLIAN static int -_eo_evas_3d_node_mesh_frame_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh) +_evas_3d_node_mesh_frame_get(Eo *obj EINA_UNUSED, Evas_3D_Node_Data *pd, Evas_3D_Mesh *mesh) { Evas_3D_Node_Mesh *nm = NULL; diff --git a/src/lib/evas/canvas/evas_3d_node.eo b/src/lib/evas/canvas/evas_3d_node.eo index fff231e010..b367705a3e 100644 --- a/src/lib/evas/canvas/evas_3d_node.eo +++ b/src/lib/evas/canvas/evas_3d_node.eo @@ -1,4 +1,4 @@ -class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) +class Evas_3D_Node (Evas_3D_Object, Evas_Common_Interface) { legacy_prefix: evas_3d_node; data: Evas_3D_Node_Data; @@ -21,6 +21,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; const; return Evas_3D_Node_Type ; } @@ -36,6 +37,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; params { @in Evas_3D_Node *member; /*@ Node object to be added. */ } @@ -49,6 +51,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; params { @in Evas_3D_Node *member; /*@ Member node to be deleted from the given node. */ } @@ -64,6 +67,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; const; return Evas_3D_Node * ; } @@ -78,6 +82,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; const; return const Eina_List * ; } @@ -95,6 +100,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; params { @in Evas_Real x; /*@ X coordinate of the position. */ @in Evas_Real y; /*@ Y coordinate of the position. */ @@ -114,6 +120,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; params { @in Evas_Real x; /*@ X term of the orientation quaternion (w, x, y, z) */ @in Evas_Real y; /*@ Y term of the orientation quaternion (w, x, y, z) */ @@ -136,6 +143,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; params { @in Evas_Real angle; /*@ Rotation angle.*/ @in Evas_Real x; /*@ X term of the rotation axis.*/ @@ -163,6 +171,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; params { @in Evas_Real x; /*@ Scale factor along X-axis.*/ @in Evas_Real y; /*@ Scale factor along Y-axis.*/ @@ -183,6 +192,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; const; params { @in Evas_3D_Space space; /*@ */ @@ -206,6 +216,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; const; params { @in Evas_3D_Space space; /*@ */ @@ -229,6 +240,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; const; params { @in Evas_3D_Space space; /*@ */ @@ -261,6 +273,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; params { @in Evas_3D_Space target_space; /*@ Space where the target position belongs to. */ @in Evas_Real x; /*@ X coordinate of the target position. */ @@ -287,6 +300,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; params { @in Evas_3D_Mesh *mesh; /*@ The mesh to be added.*/ } @@ -306,6 +320,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; params { @in Evas_3D_Mesh *mesh; /*@ The mesh to be deleted.*/ } @@ -326,6 +341,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; const; return const Eina_List *; } @@ -348,6 +364,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; } get { /* @@ -360,6 +377,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; } values { Eina_Bool inherit; /*@ Whether to inherit parent position*/ @@ -381,6 +399,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; } get { /* @@ -393,6 +412,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; } values { Eina_Bool inherit; /*@ Whether to inherit parent orientation*/ @@ -413,6 +433,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; } get { /* @@ -425,6 +446,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node_Transform */ + legacy null; } values { Eina_Bool inherit; /*@ Whether to inherit parent scale*/ @@ -446,6 +468,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; } get { /* @@ -458,6 +481,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; } values { Evas_3D_Camera *camera; /*@ The camera */ @@ -479,6 +503,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; } get { /* @@ -491,6 +516,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; } values { Evas_3D_Light *light; /*@ The light */ @@ -515,6 +541,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; } get { /* @@ -531,6 +558,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Node */ + legacy null; } keys { Evas_3D_Mesh *mesh; /*@ The given mesh.*/ @@ -543,7 +571,7 @@ class EO_Evas_3D_Node (EO_Evas_3D_Object, Evas_Common_Interface) implements { Eo_Base::constructor; Eo_Base::destructor; - EO_Evas_3D_Object::update_notify; - EO_Evas_3D_Object::change_notify; + Evas_3D_Object::update_notify; + Evas_3D_Object::change_notify; } } diff --git a/src/lib/evas/canvas/evas_3d_object.c b/src/lib/evas/canvas/evas_3d_object.c index 07386fe54b..0ef842c210 100644 --- a/src/lib/evas/canvas/evas_3d_object.c +++ b/src/lib/evas/canvas/evas_3d_object.c @@ -3,10 +3,10 @@ #include "Eo.h" -#define MY_CLASS EO_EVAS_3D_OBJECT_CLASS +#define MY_CLASS EVAS_3D_OBJECT_CLASS EOLIAN static void -_eo_evas_3d_object_eo_base_constructor(Eo *obj, Evas_3D_Object_Data *pd) +_evas_3d_object_eo_base_constructor(Eo *obj, Evas_3D_Object_Data *pd) { Eo *e = NULL; eo_do_super(obj, MY_CLASS, eo_constructor()); @@ -18,31 +18,31 @@ _eo_evas_3d_object_eo_base_constructor(Eo *obj, Evas_3D_Object_Data *pd) EOLIAN static Evas * - _eo_evas_3d_object_evas_common_interface_evas_get(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd) + _evas_3d_object_evas_common_interface_evas_get(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd) { return pd->evas; } EOLIAN static void -_eo_evas_3d_object_type_set(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd, Evas_3D_Object_Type type) +_evas_3d_object_type_set(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd, Evas_3D_Object_Type type) { pd->type = type; } EOLIAN static Evas_3D_Object_Type -_eo_evas_3d_object_type_get(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd) +_evas_3d_object_type_get(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd) { return pd->type; } EOLIAN static Eina_Bool -_eo_evas_3d_object_dirty_get(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd, Evas_3D_State state) +_evas_3d_object_dirty_get(Eo *obj EINA_UNUSED, Evas_3D_Object_Data *pd, Evas_3D_State state) { return pd->dirty[state]; } EOLIAN static void -_eo_evas_3d_object_change(Eo *obj, Evas_3D_Object_Data *pd, Evas_3D_State state, Evas_3D_Object *ref) +_evas_3d_object_change(Eo *obj, Evas_3D_Object_Data *pd, Evas_3D_State state, Evas_3D_Object *ref) { /* Skip already dirty properties. */ if (pd->dirty[state]) @@ -51,16 +51,16 @@ _eo_evas_3d_object_change(Eo *obj, Evas_3D_Object_Data *pd, Evas_3D_State state, pd->dirty[state] = EINA_TRUE; pd->dirty[EVAS_3D_STATE_ANY] = EINA_TRUE; - eo_do(obj, eo_evas_3d_object_change_notify(state, ref)); + eo_do(obj, evas_3d_object_change_notify(state, ref)); } EOLIAN static void -_eo_evas_3d_object_update(Eo *obj, Evas_3D_Object_Data *pd) +_evas_3d_object_update(Eo *obj, Evas_3D_Object_Data *pd) { if (!pd->dirty[EVAS_3D_STATE_ANY]) return; - eo_do(obj, eo_evas_3d_object_update_notify()); + eo_do(obj, evas_3d_object_update_notify()); memset(&pd->dirty[0], 0x00, sizeof(Eina_Bool) * EVAS_3D_STATE_MAX); } diff --git a/src/lib/evas/canvas/evas_3d_object.eo b/src/lib/evas/canvas/evas_3d_object.eo index 02bce86292..c02ed79997 100644 --- a/src/lib/evas/canvas/evas_3d_object.eo +++ b/src/lib/evas/canvas/evas_3d_object.eo @@ -1,4 +1,4 @@ -class EO_Evas_3D_Object (Eo_Base, Evas_Common_Interface) +class Evas_3D_Object (Eo_Base, Evas_Common_Interface) { legacy_prefix: evas_3d_object; data: Evas_3D_Object_Data; @@ -11,11 +11,13 @@ class EO_Evas_3D_Object (Eo_Base, Evas_Common_Interface) @in Evas_3D_State state; /*@ State that is changed */ @in Evas_3D_Object *ref; /*@ The Object that caused the change */ } + legacy null; } type_get { /*@ Returns the type of the object. */ + legacy null; const; return Evas_3D_Object_Type; } @@ -24,6 +26,7 @@ class EO_Evas_3D_Object (Eo_Base, Evas_Common_Interface) /*@ Returns the type of the object. */ + legacy null; params{ @in Evas_3D_Object_Type type; } @@ -33,6 +36,7 @@ class EO_Evas_3D_Object (Eo_Base, Evas_Common_Interface) /*@ Returns the status of a particular state of the object. */ + legacy null; const; return Eina_Bool; params { @@ -44,12 +48,14 @@ class EO_Evas_3D_Object (Eo_Base, Evas_Common_Interface) /*@ Update request for the object. */ + legacy null; } update_notify { /*@ Pure virtual update_notify function.. Update request for the object. */ + legacy null; } change_notify { @@ -57,6 +63,7 @@ class EO_Evas_3D_Object (Eo_Base, Evas_Common_Interface) Pure virtual change_notify function.. Update request for the object. */ + legacy null; params { @in Evas_3D_State state; /*@ State that is changed */ @in Evas_3D_Object *ref; /*@ The Object that caused the change */ diff --git a/src/lib/evas/canvas/evas_3d_scene.c b/src/lib/evas/canvas/evas_3d_scene.c index b53f419822..966da9cb9b 100644 --- a/src/lib/evas/canvas/evas_3d_scene.c +++ b/src/lib/evas/canvas/evas_3d_scene.c @@ -8,7 +8,7 @@ #include "Eo.h" -#define MY_CLASS EO_EVAS_3D_SCENE_CLASS +#define MY_CLASS EVAS_3D_SCENE_CLASS void evas_3d_scene_data_init(Evas_3D_Scene_Public_Data *data) @@ -29,7 +29,7 @@ evas_3d_scene_data_fini(Evas_3D_Scene_Public_Data *data) } EOLIAN static void -_eo_evas_3d_scene_eo_evas_3d_object_change_notify(Eo *eo_obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) +_evas_3d_scene_evas_3d_object_change_notify(Eo *eo_obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) { Eina_List *l; Evas_Object *eo; @@ -42,16 +42,16 @@ _eo_evas_3d_scene_eo_evas_3d_object_change_notify(Eo *eo_obj EINA_UNUSED, Evas_3 } EOLIAN static void -_eo_evas_3d_scene_eo_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd) +_evas_3d_scene_evas_3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd) { if (pd->root_node) { - evas_3d_object_update(pd->root_node); + eo_do(pd->root_node, evas_3d_object_update()); } if (pd->camera_node) { - evas_3d_object_update(pd->camera_node); + eo_do(pd->camera_node, evas_3d_object_update()); } } @@ -67,21 +67,21 @@ evas_3d_scene_add(Evas *e) } EOLIAN static void -_eo_evas_3d_scene_eo_base_constructor(Eo *obj, Evas_3D_Scene_Data *pd) +_evas_3d_scene_eo_base_constructor(Eo *obj, Evas_3D_Scene_Data *pd) { eo_do_super(obj, MY_CLASS, eo_constructor()); - eo_do(obj, eo_evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_SCENE)); + eo_do(obj, evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_SCENE)); evas_color_set(&pd->bg_color, 0.0, 0.0, 0.0, 0.0); } EOLIAN static void -_eo_evas_3d_scene_eo_base_destructor(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd EINA_UNUSED) +_evas_3d_scene_eo_base_destructor(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd EINA_UNUSED) { //evas_3d_object_unreference(&pd->base); } EOLIAN static void -_eo_evas_3d_scene_root_node_set(Eo *obj, Evas_3D_Scene_Data *pd, Evas_3D_Node *node) +_evas_3d_scene_root_node_set(Eo *obj, Evas_3D_Scene_Data *pd, Evas_3D_Node *node) { if (pd->root_node == node) return; @@ -100,17 +100,17 @@ _eo_evas_3d_scene_root_node_set(Eo *obj, Evas_3D_Scene_Data *pd, Evas_3D_Node *n evas_3d_node_scene_root_add(node, obj); } - evas_3d_object_change(obj, EVAS_3D_STATE_SCENE_ROOT_NODE, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_ROOT_NODE, NULL)); } EOLIAN static Evas_3D_Node * -_eo_evas_3d_scene_root_node_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd) +_evas_3d_scene_root_node_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd) { return pd->root_node; } EOLIAN static void -_eo_evas_3d_scene_camera_node_set(Eo *obj, Evas_3D_Scene_Data *pd, Evas_3D_Node *node) +_evas_3d_scene_camera_node_set(Eo *obj, Evas_3D_Scene_Data *pd, Evas_3D_Node *node) { if (pd->camera_node == node) return; @@ -129,40 +129,40 @@ _eo_evas_3d_scene_camera_node_set(Eo *obj, Evas_3D_Scene_Data *pd, Evas_3D_Node evas_3d_node_scene_camera_add(node, obj); } - evas_3d_object_change(obj, EVAS_3D_STATE_SCENE_CAMERA_NODE, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_CAMERA_NODE, NULL)); } EOLIAN static Evas_3D_Node * -_eo_evas_3d_scene_camera_node_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd) +_evas_3d_scene_camera_node_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd) { return pd->camera_node; } EOLIAN static void -_eo_evas_3d_scene_size_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, int w, int h) +_evas_3d_scene_size_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, int w, int h) { pd->w = w; pd->h = h; - evas_3d_object_change(obj, EVAS_3D_STATE_SCENE_SIZE, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_SIZE, NULL)); } EOLIAN static void -_eo_evas_3d_scene_size_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, int *w, int *h) +_evas_3d_scene_size_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, int *w, int *h) { if (w) *w = pd->w; if (h) *h = pd->h; } EOLIAN static void -_eo_evas_3d_scene_background_color_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, +_evas_3d_scene_background_color_set(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a) { evas_color_set(&pd->bg_color, r, g, b, a); - evas_3d_object_change(obj, EVAS_3D_STATE_SCENE_BACKGROUND_COLOR, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_SCENE_BACKGROUND_COLOR, NULL)); } EOLIAN static void -_eo_evas_3d_scene_background_color_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, +_evas_3d_scene_background_color_get(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a) { if (r) *r = pd->bg_color.r; @@ -325,7 +325,7 @@ _pick_data_mesh_add(Evas_3D_Pick_Data *data, const Evas_Ray3 *ray, evas_3d_mesh_interpolate_vertex_buffer_get(mesh, frame, EVAS_3D_VERTEX_TEXCOORD, &tex0, &tex1, &tex_weight); - Evas_3D_Mesh_Data *pdmesh = eo_data_scope_get(mesh, EO_EVAS_3D_MESH_CLASS); + Evas_3D_Mesh_Data *pdmesh = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS); if (pdmesh->indices) { unsigned int i0, i1, i2; @@ -513,7 +513,7 @@ _node_pick(Evas_3D_Node *node, void *data) Evas_Ray3 ray; Evas_3D_Pick_Data *pick = (Evas_3D_Pick_Data *)data; Evas_Mat4 mvp; - Evas_3D_Node_Data *pd_node = eo_data_scope_get(node, EO_EVAS_3D_NODE_CLASS); + Evas_3D_Node_Data *pd_node = eo_data_scope_get(node, EVAS_3D_NODE_CLASS); if (! evas_box3_ray3_intersect(&pd_node->aabb, &pick->ray_world)) { @@ -543,9 +543,9 @@ _node_pick(Evas_3D_Node *node, void *data) } EOLIAN static Eina_Bool -_eo_evas_3d_scene_pick(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Evas_Real x, Evas_Real y, - Evas_3D_Node **node, Evas_3D_Mesh **mesh, - Evas_Real *s, Evas_Real *t) +_evas_3d_scene_pick(Eo *obj, Evas_3D_Scene_Data *pd, Evas_Real x, Evas_Real y, + Evas_3D_Node **node, Evas_3D_Mesh **mesh, + Evas_Real *s, Evas_Real *t) { /* TODO: Use H/W picking if availabe. */ Evas_3D_Pick_Data data; @@ -561,9 +561,9 @@ _eo_evas_3d_scene_pick(Eo *obj EINA_UNUSED, Evas_3D_Scene_Data *pd, Evas_Real x, data.t = 0.0; /* Update the scene graph. */ - evas_3d_object_update((Evas_3D_Object *)obj); - Evas_3D_Node_Data *pd_camera_node = eo_data_scope_get(pd->camera_node, EO_EVAS_3D_NODE_CLASS); - Evas_3D_Camera_Data *pd_camera = eo_data_scope_get(pd_camera_node->data.camera.camera, EO_EVAS_3D_CAMERA_CLASS); + eo_do(obj, evas_3d_object_update()); + Evas_3D_Node_Data *pd_camera_node = eo_data_scope_get(pd->camera_node, EVAS_3D_NODE_CLASS); + Evas_3D_Camera_Data *pd_camera = eo_data_scope_get(pd_camera_node->data.camera.camera, EVAS_3D_CAMERA_CLASS); evas_mat4_multiply(&data.matrix_vp, &pd_camera->projection, &pd_camera_node->data.camera.matrix_world_to_eye); diff --git a/src/lib/evas/canvas/evas_3d_scene.eo b/src/lib/evas/canvas/evas_3d_scene.eo index 03ead124cf..45863502ff 100644 --- a/src/lib/evas/canvas/evas_3d_scene.eo +++ b/src/lib/evas/canvas/evas_3d_scene.eo @@ -1,4 +1,4 @@ -class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) +class Evas_3D_Scene (Evas_3D_Object, Evas_Common_Interface) { legacy_prefix: evas_3d_scene; data: Evas_3D_Scene_Data; @@ -12,6 +12,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; params { @in int w; /*@ Width of the resolution. */ @in int h; /*@ Height of the resolution. */ @@ -24,6 +25,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; const; params { @out int w; /*@ Pointer to receive width of the resolution. */ @@ -43,6 +45,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; params { @in Evas_Real r; /*@ Red component of the background color. */ @in Evas_Real g; /*@ Green component of the background color. */ @@ -58,6 +61,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; const; params { @out Evas_Real r; /*@ Pointer to receive red component of the background color.*/ @@ -77,6 +81,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; const; return Eina_Bool ; params { @@ -99,6 +104,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; } get { /* @@ -108,6 +114,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; } values { Evas_3D_Node *node; /*@ A node which will be used as a root node for the scene. */ @@ -121,6 +128,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; } get { /* @@ -130,6 +138,7 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Scene */ + legacy null; } values { Evas_3D_Node *node; /*@ A node which will be used as a camera node for the scene. */ @@ -139,8 +148,8 @@ class EO_Evas_3D_Scene (EO_Evas_3D_Object, Evas_Common_Interface) implements { Eo_Base::constructor; Eo_Base::destructor; - EO_Evas_3D_Object::update_notify; - EO_Evas_3D_Object::change_notify; + Evas_3D_Object::update_notify; + Evas_3D_Object::change_notify; } } diff --git a/src/lib/evas/canvas/evas_3d_texture.c b/src/lib/evas/canvas/evas_3d_texture.c index 066efef4f5..9cfaace27e 100644 --- a/src/lib/evas/canvas/evas_3d_texture.c +++ b/src/lib/evas/canvas/evas_3d_texture.c @@ -8,7 +8,7 @@ #include "Eo.h" -#define MY_CLASS EO_EVAS_3D_TEXTURE_CLASS +#define MY_CLASS EVAS_3D_TEXTURE_CLASS static inline void _texture_proxy_set(Evas_3D_Texture *texture, Evas_Object *eo_src, Evas_Object_Protected_Data *src) @@ -196,12 +196,12 @@ _texture_material_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *k void *data EINA_UNUSED, void *fdata) { Evas_3D_Material *m = *(Evas_3D_Material **)key; - evas_3d_object_change(m, EVAS_3D_STATE_MATERIAL_TEXTURE, (Evas_3D_Object *)fdata); + eo_do(m, evas_3d_object_change(EVAS_3D_STATE_MATERIAL_TEXTURE, (Evas_3D_Object *)fdata)); return EINA_TRUE; } EOLIAN static void -_eo_evas_3d_texture_eo_evas_3d_object_change_notify(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) +_evas_3d_texture_evas_3d_object_change_notify(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_State state EINA_UNUSED, Evas_3D_Object *ref EINA_UNUSED) { if (pd->materials) @@ -209,7 +209,7 @@ _eo_evas_3d_texture_eo_evas_3d_object_change_notify(Eo *obj, Evas_3D_Texture_Dat } EOLIAN static void -_eo_evas_3d_texture_eo_evas_3d_object_update_notify(Eo *obj, Evas_3D_Texture_Data *pd) +_evas_3d_texture_evas_3d_object_update_notify(Eo *obj, Evas_3D_Texture_Data *pd) { if (pd->source) { @@ -301,21 +301,21 @@ evas_3d_texture_add(Evas *e) EOLIAN static void -_eo_evas_3d_texture_eo_base_constructor(Eo *obj, Evas_3D_Texture_Data *pd EINA_UNUSED) +_evas_3d_texture_eo_base_constructor(Eo *obj, Evas_3D_Texture_Data *pd EINA_UNUSED) { eo_do_super(obj, MY_CLASS, eo_constructor()); - eo_do(obj, eo_evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_TEXTURE)); + eo_do(obj, evas_3d_object_type_set(EVAS_3D_OBJECT_TYPE_TEXTURE)); } EOLIAN static void -_eo_evas_3d_texture_eo_base_destructor(Eo *obj, Evas_3D_Texture_Data *pd EINA_UNUSED) +_evas_3d_texture_eo_base_destructor(Eo *obj, Evas_3D_Texture_Data *pd EINA_UNUSED) { //evas_3d_object_unreference(&pd->base); _texture_fini(obj); } EOLIAN static void -_eo_evas_3d_texture_data_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Evas_3D_Color_Format color_format, +_evas_3d_texture_data_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Evas_3D_Color_Format color_format, Evas_3D_Pixel_Format pixel_format, int w, int h, const void *data) { Eo *evas = NULL; @@ -328,11 +328,11 @@ _eo_evas_3d_texture_data_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Evas e->engine.func->texture_data_set(e->engine.data.output, pd->engine_data, color_format, pixel_format, w, h, data); - evas_3d_object_change(obj, EVAS_3D_STATE_TEXTURE_DATA, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_TEXTURE_DATA, NULL)); } EOLIAN static void -_eo_evas_3d_texture_file_set(Eo *obj, Evas_3D_Texture_Data *pd, const char *file, const char *key) +_evas_3d_texture_file_set(Eo *obj, Evas_3D_Texture_Data *pd, const char *file, const char *key) { Eo *evas = NULL; eo_do(obj, evas = evas_common_evas_get()); @@ -342,11 +342,11 @@ _eo_evas_3d_texture_file_set(Eo *obj, Evas_3D_Texture_Data *pd, const char *file pd->engine_data = e->engine.func->texture_new(e->engine.data.output); e->engine.func->texture_file_set(e->engine.data.output, pd->engine_data, file, key); - evas_3d_object_change(obj, EVAS_3D_STATE_TEXTURE_DATA, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_TEXTURE_DATA, NULL)); } EAPI void -_eo_evas_3d_texture_source_set(Eo *obj , Evas_3D_Texture_Data *pd, Evas_Object *source) +_evas_3d_texture_source_set(Eo *obj , Evas_3D_Texture_Data *pd, Evas_Object *source) { Eo *evas = NULL; eo_do(obj, evas = evas_common_evas_get()); @@ -381,11 +381,11 @@ _eo_evas_3d_texture_source_set(Eo *obj , Evas_3D_Texture_Data *pd, Evas_Object * } _texture_proxy_set(obj, source, src); - evas_3d_object_change(obj, EVAS_3D_STATE_TEXTURE_DATA, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_TEXTURE_DATA, NULL)); } EOLIAN static void -_eo_evas_3d_texture_source_visible_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Eina_Bool visible) +_evas_3d_texture_source_visible_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Eina_Bool visible) { Evas_Object_Protected_Data *src_obj; @@ -407,7 +407,7 @@ _eo_evas_3d_texture_source_visible_set(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data } EOLIAN static Eina_Bool -_eo_evas_3d_texture_source_visible_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd) +_evas_3d_texture_source_visible_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd) { Evas_Object_Protected_Data *src_obj; @@ -419,7 +419,7 @@ _eo_evas_3d_texture_source_visible_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data } EOLIAN static Evas_3D_Color_Format -_eo_evas_3d_texture_color_format_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd) +_evas_3d_texture_color_format_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd) { Evas_3D_Color_Format format; Eo *evas = NULL; @@ -430,7 +430,7 @@ _eo_evas_3d_texture_color_format_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data * } EOLIAN static void -_eo_evas_3d_texture_size_get(Eo *obj, Evas_3D_Texture_Data *pd, int *w, int *h) +_evas_3d_texture_size_get(Eo *obj, Evas_3D_Texture_Data *pd, int *w, int *h) { Eo *evas = NULL; eo_do(obj, evas = evas_common_evas_get()); @@ -439,17 +439,17 @@ _eo_evas_3d_texture_size_get(Eo *obj, Evas_3D_Texture_Data *pd, int *w, int *h) } EOLIAN static void -_eo_evas_3d_texture_wrap_set(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Wrap_Mode s, Evas_3D_Wrap_Mode t) +_evas_3d_texture_wrap_set(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Wrap_Mode s, Evas_3D_Wrap_Mode t) { Eo *evas = NULL; eo_do(obj, evas = evas_common_evas_get()); Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CLASS); e->engine.func->texture_wrap_set(e->engine.data.output, pd->engine_data, s, t); - evas_3d_object_change(obj, EVAS_3D_STATE_TEXTURE_WRAP, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_TEXTURE_WRAP, NULL)); } EOLIAN static void -_eo_evas_3d_texture_wrap_get(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Wrap_Mode *s, Evas_3D_Wrap_Mode *t) +_evas_3d_texture_wrap_get(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Wrap_Mode *s, Evas_3D_Wrap_Mode *t) { Eo *evas = NULL; eo_do(obj, evas = evas_common_evas_get()); @@ -458,17 +458,17 @@ _eo_evas_3d_texture_wrap_get(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Wrap_Mod } EOLIAN static void -_eo_evas_3d_texture_filter_set(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Texture_Filter min, Evas_3D_Texture_Filter mag) +_evas_3d_texture_filter_set(Eo *obj, Evas_3D_Texture_Data *pd, Evas_3D_Texture_Filter min, Evas_3D_Texture_Filter mag) { Eo *evas = NULL; eo_do(obj, evas = evas_common_evas_get()); Evas_Public_Data *e = eo_data_scope_get(evas, EVAS_CLASS); e->engine.func->texture_filter_set(e->engine.data.output, pd->engine_data, min, mag); - evas_3d_object_change(obj, EVAS_3D_STATE_TEXTURE_FILTER, NULL); + eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_TEXTURE_FILTER, NULL)); } EOLIAN static void -_eo_evas_3d_texture_filter_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Evas_3D_Texture_Filter *min, Evas_3D_Texture_Filter *mag) +_evas_3d_texture_filter_get(Eo *obj EINA_UNUSED, Evas_3D_Texture_Data *pd, Evas_3D_Texture_Filter *min, Evas_3D_Texture_Filter *mag) { Eo *evas = NULL; eo_do(obj, evas = evas_common_evas_get()); diff --git a/src/lib/evas/canvas/evas_3d_texture.eo b/src/lib/evas/canvas/evas_3d_texture.eo index a7e6cae529..d2f9f46363 100644 --- a/src/lib/evas/canvas/evas_3d_texture.eo +++ b/src/lib/evas/canvas/evas_3d_texture.eo @@ -1,4 +1,4 @@ -class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) +class Evas_3D_Texture (Evas_3D_Object, Evas_Common_Interface) { legacy_prefix: evas_3d_texture; data : Evas_3D_Texture_Data; @@ -17,6 +17,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; } get { /* @@ -26,6 +27,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; } values { Eina_Bool visible; /*@ @c EINA_TRUE for visible, @c EINA_FALSE for invisible.*/ @@ -42,6 +44,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; params { @in Evas_3D_Color_Format color_format; /*@ Color format of the texture. */ @in Evas_3D_Pixel_Format pixel_format; /*@ Pixel format of the data. */ @@ -60,6 +63,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; return void ; params { @in const char *file; /*@ Path to the image file. */ @@ -79,6 +83,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; return void ; params { @in Evas_Object *source; /*@ Source evas object to be used as the texture data. */ @@ -98,6 +103,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; const; return Evas_3D_Color_Format ; } @@ -115,6 +121,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; const; params { @out int w; /*@ Pointer to receive the width of the texture size. */ @@ -132,6 +139,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; params { @in Evas_3D_Wrap_Mode s; /*@ Wrap mode for S-axis. */ @in Evas_3D_Wrap_Mode t; /*@ Wrap mode for T-axis. */ @@ -147,6 +155,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; return void ; params { @out Evas_3D_Wrap_Mode s; /*@ Pointer to receive S-axis wrap mode. */ @@ -163,6 +172,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; params { @in Evas_3D_Texture_Filter min; /*@ Minification filter used when down-scaling. */ @in Evas_3D_Texture_Filter mag; /*@ Magnification filter used when up-scaling. */ @@ -182,6 +192,7 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) @ingroup Evas_3D_Texture */ + legacy null; const; params { @out Evas_3D_Texture_Filter min; /*@ Pointer to receive the minification filter. */ @@ -193,8 +204,8 @@ class EO_Evas_3D_Texture (EO_Evas_3D_Object, Evas_Common_Interface) implements { Eo_Base::constructor; Eo_Base::destructor; - EO_Evas_3D_Object::update_notify; - EO_Evas_3D_Object::change_notify; + Evas_3D_Object::update_notify; + Evas_3D_Object::change_notify; } } diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 153b6e9076..5c1e83a0ff 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -2420,7 +2420,7 @@ _3d_set(Evas_Object *eo_obj, Evas_3D_Scene *scene) Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS); Evas_Image_Data *o = eo_data_scope_get(eo_obj, MY_CLASS); Evas_3D_Scene_Data *pd_scene = eo_data_scope_get(scene, - EO_EVAS_3D_SCENE_CLASS); + EVAS_3D_SCENE_CLASS); EINA_COW_WRITE_BEGIN(evas_object_3d_cow, obj->data_3d, Evas_Object_3D_Data, data) { @@ -2449,7 +2449,7 @@ _3d_unset(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, if (!o->cur->scene) return; Evas_3D_Scene_Data *pd_scene = - eo_data_scope_get(o->cur->scene, EO_EVAS_3D_SCENE_CLASS); + eo_data_scope_get(o->cur->scene, EVAS_3D_SCENE_CLASS); EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write) { @@ -2494,7 +2494,7 @@ _3d_render(Evas *eo_e, Evas_Object *eo_obj EINA_UNUSED, Evas_3D_Scene_Public_Data scene_data; Evas_3D_Scene_Data *pd_scene = NULL; - pd_scene = eo_data_scope_get(scene, EO_EVAS_3D_SCENE_CLASS); + pd_scene = eo_data_scope_get(scene, EVAS_3D_SCENE_CLASS); if((pd_scene->w == 0) || (pd_scene->h == 0)) return; @@ -2544,7 +2544,7 @@ _3d_render(Evas *eo_e, Evas_Object *eo_obj EINA_UNUSED, scene_data.camera_node = pd_scene->camera_node; /* Phase 1 - Update scene graph tree. */ - evas_3d_object_update(scene); + eo_do(scene, evas_3d_object_update()); /* Phase 2 - Do frustum culling and get visible model nodes. */ evas_3d_node_tree_traverse(pd_scene->root_node, @@ -3379,8 +3379,10 @@ evas_object_image_render_pre(Evas_Object *eo_obj, else if (o->cur->scene) { Evas_3D_Scene *scene = o->cur->scene; - //Evas_3D_Scene_Data *pd_scene = eo_data_scope_get(scene, EO_EVAS_3D_SCENE_CLASS); - if (evas_3d_object_dirty_get(scene, EVAS_3D_STATE_ANY)) + Eina_Bool dirty; + + eo_do(scene, dirty = evas_3d_object_dirty_get(EVAS_3D_STATE_ANY)); + if (dirty) { evas_object_render_pre_prev_cur_add(&e->clip_changes, eo_obj, obj); goto done; diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index f317806bd0..020914cca4 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -246,7 +246,7 @@ evas_object_change(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) } EINA_LIST_FOREACH(obj->proxy->proxy_textures, l, texture) { - evas_3d_object_change(texture, EVAS_3D_STATE_TEXTURE_DATA, NULL); + eo_do(texture, evas_3d_object_change(EVAS_3D_STATE_TEXTURE_DATA, NULL)); } if (obj->smart.parent) { @@ -679,7 +679,7 @@ _evas_object_eo_base_destructor(Eo *eo_obj, Evas_Object_Protected_Data *obj) } while (obj->proxy->proxy_textures) - evas_3d_texture_source_set(obj->proxy->proxy_textures->data, NULL); + eo_do(obj->proxy->proxy_textures->data, evas_3d_texture_source_set(NULL)); if (obj->cur->clipper) evas_object_clip_unset(eo_obj); evas_object_map_set(eo_obj, NULL); diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index 0842013546..0165d10068 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -1487,18 +1487,6 @@ void _canvas_objects_in_rectangle_get(Eo *obj, void *_pd, va_list *list); void _canvas_smart_objects_calculate(Eo *e, void *_pd, va_list *list); void _canvas_smart_objects_calculate_count_get(Eo *e, void *_pd, va_list *list); -/* Object generic functions. 3D function*/ -void evas_3d_object_init(Evas_3D_Object *obj, Evas *e, Evas_3D_Object_Type type, const Evas_3D_Object_Func *func); -Evas *evas_3d_object_evas_get(const Evas_3D_Object *obj); -Evas_3D_Object_Type evas_3d_object_type_get(const Evas_3D_Object *obj); -void evas_3d_object_reference(Evas_3D_Object *obj); -void evas_3d_object_unreference(Evas_3D_Object *obj); -int evas_3d_object_reference_count_get(const Evas_3D_Object *obj); -void evas_3d_object_change(Evas_3D_Object *obj, Evas_3D_State state, Evas_3D_Object *ref); -Eina_Bool evas_3d_object_dirty_get(const Evas_3D_Object *obj, Evas_3D_State state); -void evas_3d_object_update(Evas_3D_Object *obj); -void evas_3d_object_update_done(Evas_3D_Object *obj); - /* Node functions. */ void evas_3d_node_traverse(Evas_3D_Node *from, Evas_3D_Node *to, Evas_3D_Node_Traverse_Type type, Eina_Bool skip, Evas_3D_Node_Func func, void *data); void evas_3d_node_tree_traverse(Evas_3D_Node *root, Evas_3D_Tree_Traverse_Type type, Eina_Bool skip, Evas_3D_Node_Func func, void *data); diff --git a/src/modules/evas/engines/gl_common/evas_gl_3d.c b/src/modules/evas/engines/gl_common/evas_gl_3d.c index 4321ffd729..8acb65f353 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_3d.c +++ b/src/modules/evas/engines/gl_common/evas_gl_3d.c @@ -597,7 +597,7 @@ e3d_drawable_format_get(E3D_Drawable *drawable) static inline GLuint _texture_id_get(Evas_3D_Texture *texture) { - Evas_3D_Texture_Data *pd = eo_data_scope_get(texture, EO_EVAS_3D_TEXTURE_CLASS); + Evas_3D_Texture_Data *pd = eo_data_scope_get(texture, EVAS_3D_TEXTURE_CLASS); E3D_Texture *tex = (E3D_Texture *)pd->engine_data; return tex->tex; @@ -609,7 +609,7 @@ _mesh_frame_find(Evas_3D_Mesh *mesh, int frame, { Eina_List *left, *right; Evas_3D_Mesh_Frame *f0, *f1; - Evas_3D_Mesh_Data *pdmesh = eo_data_scope_get(mesh, EO_EVAS_3D_MESH_CLASS); + Evas_3D_Mesh_Data *pdmesh = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS); left = pdmesh->frames; right = eina_list_next(left); @@ -839,7 +839,7 @@ _material_color_build(E3D_Draw_Data *data, int frame, if (f0->material) { - Evas_3D_Material_Data *pdm = eo_data_scope_get(f0->material, EO_EVAS_3D_MATERIAL_CLASS); + Evas_3D_Material_Data *pdm = eo_data_scope_get(f0->material, EVAS_3D_MATERIAL_CLASS); if (pdm->attribs[attrib].enable) break; } @@ -854,7 +854,7 @@ _material_color_build(E3D_Draw_Data *data, int frame, if (f1->material) { - Evas_3D_Material_Data *pdm = eo_data_scope_get(f1->material, EO_EVAS_3D_MATERIAL_CLASS); + Evas_3D_Material_Data *pdm = eo_data_scope_get(f1->material, EVAS_3D_MATERIAL_CLASS); if (pdm->attribs[attrib].enable) break; } @@ -883,7 +883,7 @@ _material_color_build(E3D_Draw_Data *data, int frame, f1 = NULL; } } - Evas_3D_Material_Data *pdmf0 = eo_data_scope_get(f0->material, EO_EVAS_3D_MATERIAL_CLASS); + Evas_3D_Material_Data *pdmf0 = eo_data_scope_get(f0->material, EVAS_3D_MATERIAL_CLASS); if (f1 == NULL) { data->materials[attrib].color = pdmf0->attribs[attrib].color; @@ -894,7 +894,7 @@ _material_color_build(E3D_Draw_Data *data, int frame, else { Evas_Real weight; - Evas_3D_Material_Data *pdmf1 = eo_data_scope_get(f1->material, EO_EVAS_3D_MATERIAL_CLASS); + Evas_3D_Material_Data *pdmf1 = eo_data_scope_get(f1->material, EVAS_3D_MATERIAL_CLASS); weight = (f1->frame - frame) / (Evas_Real)(f1->frame - f0->frame); evas_color_blend(&data->materials[attrib].color, @@ -926,7 +926,7 @@ _material_texture_build(E3D_Draw_Data *data, int frame, if (f0->material) { - Evas_3D_Material_Data *pdm = eo_data_scope_get(f0->material, EO_EVAS_3D_MATERIAL_CLASS); + Evas_3D_Material_Data *pdm = eo_data_scope_get(f0->material, EVAS_3D_MATERIAL_CLASS); if (pdm->attribs[attrib].enable && pdm->attribs[attrib].texture != NULL) break; } @@ -941,7 +941,7 @@ _material_texture_build(E3D_Draw_Data *data, int frame, if (f1->material) { - Evas_3D_Material_Data *pdm = eo_data_scope_get(f1->material, EO_EVAS_3D_MATERIAL_CLASS); + Evas_3D_Material_Data *pdm = eo_data_scope_get(f1->material, EVAS_3D_MATERIAL_CLASS); if (pdm->attribs[attrib].enable && pdm->attribs[attrib].texture != NULL) break; } @@ -971,18 +971,18 @@ _material_texture_build(E3D_Draw_Data *data, int frame, } } - Evas_3D_Material_Data *pdmf0 = eo_data_scope_get(f0->material, EO_EVAS_3D_MATERIAL_CLASS); + Evas_3D_Material_Data *pdmf0 = eo_data_scope_get(f0->material, EVAS_3D_MATERIAL_CLASS); data->materials[attrib].sampler0 = data->texture_count++; - Evas_3D_Texture_Data *pd = eo_data_scope_get(pdmf0->attribs[attrib].texture, EO_EVAS_3D_TEXTURE_CLASS); + Evas_3D_Texture_Data *pd = eo_data_scope_get(pdmf0->attribs[attrib].texture, EVAS_3D_TEXTURE_CLASS); data->materials[attrib].tex0 = (E3D_Texture *)pd->engine_data; if (f1) { - Evas_3D_Material_Data *pdmf1 = eo_data_scope_get(f1->material, EO_EVAS_3D_MATERIAL_CLASS); + Evas_3D_Material_Data *pdmf1 = eo_data_scope_get(f1->material, EVAS_3D_MATERIAL_CLASS); Evas_Real weight = (f1->frame - frame) / (Evas_Real)(f1->frame - f0->frame); data->materials[attrib].sampler1 = data->texture_count++; - Evas_3D_Texture_Data *pd = eo_data_scope_get(pdmf1->attribs[attrib].texture, EO_EVAS_3D_TEXTURE_CLASS); + Evas_3D_Texture_Data *pd = eo_data_scope_get(pdmf1->attribs[attrib].texture, EVAS_3D_TEXTURE_CLASS); data->materials[attrib].tex1 = (E3D_Texture *)pd->engine_data; data->materials[attrib].texture_weight = weight; @@ -1011,9 +1011,9 @@ _light_build(E3D_Draw_Data *data, const Evas_3D_Node *light, const Evas_Mat4 *matrix_eye) { - Evas_3D_Node_Data *pd_light_node = eo_data_scope_get(light, EO_EVAS_3D_NODE_CLASS); + Evas_3D_Node_Data *pd_light_node = eo_data_scope_get(light, EVAS_3D_NODE_CLASS); Evas_3D_Light *l = pd_light_node->data.light.light; - Evas_3D_Light_Data *pdl = eo_data_scope_get(l, EO_EVAS_3D_LIGHT_CLASS); + Evas_3D_Light_Data *pdl = eo_data_scope_get(l, EVAS_3D_LIGHT_CLASS); Evas_Vec3 pos, dir; if (pdl == NULL) @@ -1083,7 +1083,7 @@ _mesh_draw_data_build(E3D_Draw_Data *data, const Evas_3D_Node *light) { Eina_List *l, *r; - Evas_3D_Mesh_Data *pdmesh = eo_data_scope_get(mesh, EO_EVAS_3D_MESH_CLASS); + Evas_3D_Mesh_Data *pdmesh = eo_data_scope_get(mesh, EVAS_3D_MESH_CLASS); if (pdmesh->frames == NULL) return EINA_FALSE; @@ -1216,10 +1216,10 @@ e3d_drawable_scene_render(E3D_Drawable *drawable, E3D_Renderer *renderer, Evas_3 e3d_renderer_clear(renderer, &data->bg_color); /* Get eye matrix. */ - Evas_3D_Node_Data *pd_camera_node = eo_data_scope_get(data->camera_node, EO_EVAS_3D_NODE_CLASS); + Evas_3D_Node_Data *pd_camera_node = eo_data_scope_get(data->camera_node, EVAS_3D_NODE_CLASS); matrix_eye = &pd_camera_node->data.camera.matrix_world_to_eye; - Evas_3D_Camera_Data *pd = eo_data_scope_get(pd_camera_node->data.camera.camera, EO_EVAS_3D_CAMERA_CLASS); + Evas_3D_Camera_Data *pd = eo_data_scope_get(pd_camera_node->data.camera.camera, EVAS_3D_CAMERA_CLASS); EINA_LIST_FOREACH(data->mesh_nodes, l, n) { @@ -1227,7 +1227,7 @@ e3d_drawable_scene_render(E3D_Drawable *drawable, E3D_Renderer *renderer, Evas_3 Evas_Mat4 matrix_mvp; Eina_Iterator *it; void *ptr; - Evas_3D_Node_Data *pd_mesh_node = eo_data_scope_get(n, EO_EVAS_3D_NODE_CLASS); + Evas_3D_Node_Data *pd_mesh_node = eo_data_scope_get(n, EVAS_3D_NODE_CLASS); evas_mat4_multiply(&matrix_mv, matrix_eye, &pd_mesh_node->data.mesh.matrix_local_to_world); evas_mat4_multiply(&matrix_mvp, matrix_eye, &matrix_mv); evas_mat4_multiply(&matrix_mvp, &pd->projection,