Lines Matching defs:resource

263 // Loads a resource identified by type and id into memory.
267 // find the resource
269 ResourceItem* resource = NULL;
271 resource = fContainer->ResourceAt(fContainer->IndexOf(type, id));
272 if (!resource)
276 if (error == B_OK && !resource->IsLoaded() && fResourceFile)
277 error = fResourceFile->ReadResource(*resource);
281 result = resource->Data();
283 *_size = resource->DataSize();
289 // Loads a resource identified by type and name into memory.
293 // find the resource
295 ResourceItem* resource = NULL;
297 resource = fContainer->ResourceAt(fContainer->IndexOf(type, name));
298 if (!resource)
302 if (error == B_OK && !resource->IsLoaded() && fResourceFile)
303 error = fResourceFile->ReadResource(*resource);
307 result = resource->Data();
309 *_size = resource->DataSize();
327 ResourceItem *resource = fContainer->ResourceAt(i);
328 if (resource->Type() == type) {
329 if (fResourceFile->ReadResource(*resource) != B_OK)
414 // Adds a new resource to the file.
447 // Returns whether the file contains a resource with the specified
456 // Returns whether the file contains a resource with the specified
465 // Gets information about a resource identified by byindex.
487 // Gets information about a resource identified by byType and andIndex.
509 // Gets information about a resource identified by byType and andID.
527 // Gets information about a resource identified by byType and andName.
545 // Gets information about a resource identified by byPointer.
567 // Removes a resource identified by its data pointer.
569 BResources::RemoveResource(const void* resource)
571 status_t error = (resource ? B_OK : B_BAD_VALUE);
578 = fContainer->RemoveResource(fContainer->IndexOf(resource));
588 // Removes a resource identified by type and id.
610 // Writes data into an existing resource
646 // Reads data from an existing resource
675 // Finds a resource by type and id and returns a pointer to a copy of
693 // Finds a resource by type and name and returns a pointer to a copy of