![]() |
![]() ![]() |
get or set an object's local_ptr subobject
void GDset_local ( elem_id , local_ptr );
OMobj_id elem_id ;
OMpfi create_func
int local_ptr ;
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.
The id of the object whose local_ptr subobject is being retrieved or set.
(GDget_local only) The object's create function.
|
|
(GDset_local only) The new value for the local_ptr subobject.
(GDget_local only) The value of the local_ptr subobject; NULL if GDget_local failed.
/* 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);
![]() |
![]() ![]() |