![]() |
![]() |
![]() |
![]() |
GDget_local
Synopsis
get or set an object's local_ptr subobject
int _* GDget_local _( elem_id , _NULL, _ create_func _);
void _ GDset_local _( elem_id , _ local_ptr _);
OMobj_id _ elem_id ;
OMpfi _ create_func
int _ local_ptr ;Description
An instanceable object (e.g., GDcamera or DefaultCamera, but not GDcamera_templ) includes a subobject called local_ptr, which is a pointer to internal information maintained by the Graphics Display Kit. Most of the Graphics Display Kit base types have such a subobject.
These routines enable you to get or set an object's local_ptr subobject. It is not recommended that the structure returned by the get routine be used. These structures are not documented and are subject to change.
GDget_local gets the value of an object's local_ptr subobject. It may be necessary to call this routine just prior to calling the object's delete method since some of the delete methods take the pointer returned by this routine.
GDset_local sets the value of an object's local_ptr subobject.
Parameters
Example
/* Delete a camera. First get its local_ptr value. */
OMobj_id _camera_id; /* Assume this has been set. */
GDcamera *camera;
...
camera = GDget_local(camera_id, NULL, (OMpfi) GDcamera_create);
if (camera == NULL) {
printf("Error getting the camera's local_ptr subobject\n");
return(1);
};
GDcamera_delete(NULL, camera_id, 0, camera);
![]() |
![]() |
![]() |
![]() |