void handle_deinit(AppContextRef ctx) { (void)ctx; bmp_deinit_container(&background_image_container); heap_bitmap_deinit(&icon_status_1); heap_bitmap_deinit(&icon_status_2); heap_bitmap_deinit(&icon_status_3); }
/* * Unload and return what we have taken */ void window_unload(Window *window) { heap_bitmap_deinit(&icon_battery); heap_bitmap_deinit(&icon_battery_charge); heap_bitmap_deinit(&icon_bt); heap_bitmap_deinit(&icon_entry_0); heap_bitmap_deinit(&icon_entry_1); heap_bitmap_deinit(&icon_entry_2); heap_bitmap_deinit(&icon_entry_3); heap_bitmap_deinit(&icon_entry_4); heap_bitmap_deinit(&icon_entry_5); heap_bitmap_deinit(&icon_pebble); }
void handle_deinit(AppContextRef ctx) { //text_layer_deinit(&layer_time); //text_layer_deinit(&layer_date); heap_bitmap_deinit(&bitmap_battery); heap_bitmap_deinit(&bitmap_signal); bmp_deinit_container(&layer_call); bmp_deinit_container(&layer_message); fonts_unload_custom_font(ubuntu_time); fonts_unload_custom_font(ubuntu_date); fonts_unload_custom_font(ubuntu_text); }
static void app_deinit(AppContextRef c) { app_sync_deinit(&s_data.sync); if (s_data.current_icon != 0) { heap_bitmap_deinit(&s_data.icon_bitmap); } }
void update_stats() { snprintf(string_call, sizeof(string_call), "%d", number_call); layer_mark_dirty(&layer_numbercall.layer); snprintf(string_message, sizeof(string_message), "%d", number_message); layer_mark_dirty(&layer_numbermessage.layer); int battery_id; if (level_battery > 0) battery_id = RESOURCE_ID_PNG_BATTERY_20; if (level_battery > 20) battery_id = RESOURCE_ID_PNG_BATTERY_40; if (level_battery > 40) battery_id = RESOURCE_ID_PNG_BATTERY_60; if (level_battery > 60) battery_id = RESOURCE_ID_PNG_BATTERY_80; if (level_battery > 80) battery_id = RESOURCE_ID_PNG_BATTERY_100; if (&bitmap_battery.bmp) heap_bitmap_deinit(&bitmap_battery); heap_bitmap_init(&bitmap_battery, battery_id); layer_mark_dirty(&layer_battery.layer); int signal_id; if (level_signal > 0) signal_id = RESOURCE_ID_PNG_SIGNAL_20; if (level_signal > 20) signal_id = RESOURCE_ID_PNG_SIGNAL_40; if (level_signal > 40) signal_id = RESOURCE_ID_PNG_SIGNAL_60; if (level_signal > 60) signal_id = RESOURCE_ID_PNG_SIGNAL_80; if (level_signal > 80) signal_id = RESOURCE_ID_PNG_SIGNAL_100; if (&bitmap_battery.bmp) heap_bitmap_deinit(&bitmap_signal); heap_bitmap_init(&bitmap_signal, signal_id); layer_mark_dirty(&layer_signal.layer); }
static void load_bitmap(uint32_t resource_id) { // If that resource is already the current icon, we don't need to reload it if (s_data.current_icon == resource_id) { return; } // Only deinit the current bitmap if a bitmap was previously loaded if (s_data.current_icon != 0) { heap_bitmap_deinit(&s_data.icon_bitmap); } // Keep track of what the current icon is s_data.current_icon = resource_id; // Load the new icon heap_bitmap_init(&s_data.icon_bitmap, resource_id); }
void handle_deinit(AppContextRef ctx) { // Cleanup the image heap_bitmap_deinit(&image); }
void handle_deinit(AppContextRef ctx) { int i; for (i=0; i<NUM_IMAGES; i++) { heap_bitmap_deinit(&digitBmp[i]); } }