Lines Matching refs:image

41 	typedef struct image	ValueType;
44 size_t Hash(struct image* value) const { return value->info.basic_info.id; }
45 bool Compare(image_id key, struct image* value) const
47 struct image*& GetLink(struct image* value) const
61 void Notify(uint32 eventCode, struct image* image)
67 event.AddInt32("image", image->info.basic_info.id);
68 event.AddPointer("imageStruct", image);
78 static mutex sImageMutex = MUTEX_INITIALIZER("image");
83 /*! Registers an image with the specified team.
89 struct image *image;
91 image = (struct image*)malloc(sizeof(struct image));
92 if (image == NULL)
95 memcpy(&image->info, info, sizeof(extended_image_info));
96 image->team = team->id;
101 image->info.basic_info.id = id;
103 // Add the app image to the head of the list. Some code relies on it being
104 // the first image to be returned by get_next_image_info().
105 if (image->info.basic_info.type == B_APP_IMAGE)
106 list_add_link_to_head(&team->image_list, image);
108 list_add_item(&team->image_list, image);
109 sImageTable->Insert(image);
112 sNotificationService.Notify(IMAGE_ADDED, image);
117 TRACE(("register_image(team = %p, image id = %ld, image = %p\n", team, id, image));
122 /*! Registers an image with the specified team.
131 /*! Unregisters an image from the specified team.
140 struct image *image = sImageTable->Lookup(id);
141 if (image != NULL && image->team == team->id) {
142 list_remove_link(image);
143 sImageTable->Remove(image);
151 user_debug_image_deleted(&image->info.basic_info);
154 sNotificationService.Notify(IMAGE_REMOVED, image);
156 free(image);
174 struct image *image = NULL;
175 while ((image = (struct image*)list_get_next_item(&fromTeam->image_list,
176 image)) != NULL) {
177 image_id id = register_image(toTeam, &image->info, sizeof(image->info),
193 struct image *image = NULL;
198 while ((image = (struct image*)list_get_next_item(&team->image_list, image))
213 struct image *image;
219 while ((image = (struct image*)list_remove_head_item(&team->image_list))
221 sImageTable->Remove(image);
222 free(image);
241 struct image *image = sImageTable->Lookup(id);
242 if (image != NULL) {
243 memcpy(info, &image->info.basic_info, size);
269 struct image* image = NULL;
272 while ((image = (struct image*)list_get_next_item(&team->image_list,
273 image)) != NULL) {
275 memcpy(info, &image->info.basic_info, size);
290 struct image *image = NULL;
307 while ((image = (struct image*)list_get_next_item(&team->image_list, image))
309 image_info *info = &image->info.basic_info;
321 struct image*
327 struct image* image = NULL;
328 while ((image = it.Next()) != NULL) {
329 if (callback(image, cookie))
333 return image;
337 struct image*
350 struct image* image = NULL;
352 while ((image = (struct image*)list_get_next_item(&team->image_list,
353 image)) != NULL) {
354 if (callback(image, cookie))
358 return image;
370 struct image *image = NULL;
372 while ((image = (struct image*)list_get_next_item(&team->image_list, image))
374 image_info *info = &image->info.basic_info;
382 // found image
400 panic("image_init(): Failed to allocate image table!");
406 panic("image_init(): Failed to init image table: %s", strerror(error));
482 // get an image info
485 dprintf("_user_image_relocated(%" B_PRId32 "): Failed to get image "
493 // If the image is the app image, loading is done. We need to notify the