Exemple #1
0
static void deinit() {
  app_sync_deinit(&sync);

  if (icon_loaded) {
    gbitmap_destroy(icon_bitmap);
  }
  app_sync_deinit(&sync);

  text_layer_destroy(temperature_layer);
  bitmap_layer_destroy(icon_layer);
  window_destroy(window);
}
Exemple #2
0
/*
  dealloc
*/
void handle_deinit( void ) {
  // Unsubscribe from services
  tick_timer_service_unsubscribe();
  battery_state_service_unsubscribe();
  bluetooth_connection_service_unsubscribe();

  // Destroy image objects
  destroy_graphics( background_image, background_layer );
  destroy_graphics( battery_image, battery_layer );
  destroy_graphics( bluetooth_image, bluetooth_layer );
  destroy_graphics( icon_bitmap, icon_layer );

  // Destroy text objects
  text_layer_destroy( text_time_layer );
  text_layer_destroy( text_ampm_layer );
  text_layer_destroy( text_secs_layer );
  text_layer_destroy( text_days_layer );
  text_layer_destroy( text_date_layer );
  text_layer_destroy( text_week_layer );
  text_layer_destroy( temp_layer );

  // Destroy inverter layer
  inverter_layer_destroy( currentDayLayer );
  
  // Destroy font objects
  fonts_unload_custom_font( font_time );
  fonts_unload_custom_font( font_days );
  fonts_unload_custom_font( font_date );

  // Clean up AppSync system
  app_sync_deinit( &app );

  // Destroy window
  window_destroy( window );
}
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 handle_deinit(void) {
  tick_timer_service_unsubscribe();
  battery_state_service_unsubscribe();
  bluetooth_connection_service_unsubscribe();
  app_sync_deinit(&sync);

  window_destroy(clock_window);
}
void openweather_deinit(void) {
  app_message_deregister_callbacks();
  if (update_timer) app_timer_cancel(update_timer);
  app_sync_deinit(&sync);
  openweather_deregister_all_callbacks();
  forecast_data.cnt = 0;
  if (forecast_data.day) free(forecast_data.day);
}
static void window_unload(Window *window) {
  app_sync_deinit(&sync);

  text_layer_destroy(lattitude_layer);
  text_layer_destroy(longitude_layer);
  text_layer_destroy(tracking_layer);
  text_layer_destroy(activity_layer); 
}
static void window_unload(Window *window) {
  app_sync_deinit(&sync);
  text_layer_destroy(heading_text_label);
  text_layer_destroy(heading_angle_label);
  text_layer_destroy(status_layer);
  layer_destroy(bezel_layer);
  layer_destroy(direction_layer);
  layer_destroy(heading_layer);
}
Exemple #8
0
static void window_unload(Window *window) {
  app_sync_deinit(&sync);

  text_layer_destroy(gridpower_layer);
  text_layer_destroy(dailyenery_layer);
  text_layer_destroy(montlyenergy_layer);
  text_layer_destroy(yearlyenergy_layer);
  text_layer_destroy(totalenergy_layer);
}
static void window_unload(Window *window) {
  app_sync_deinit(&sync);

  if (icon_bitmap) {
    gbitmap_destroy(icon_bitmap);
  }

  text_layer_destroy(temperature_layer);
  bitmap_layer_destroy(icon_layer);
}
Exemple #10
0
static void window_unload(Window *window) {
	app_sync_deinit(&sync);
	
	tick_timer_service_unsubscribe();
	
	text_layer_destroy(text_date_layer);
	text_layer_destroy(text_time_layer);
	text_layer_destroy(text_five_layer);
  text_layer_destroy(text_hash_layer);

}
Exemple #11
0
static void window_unload(Window *window) {
	app_sync_deinit(&sync);
	text_layer_destroy(wind_layer);
	text_layer_destroy(weather_layer);
	text_layer_destroy(area_name_layer);
	text_layer_destroy(temps_layer);
	text_layer_destroy(snowfall_layer);
	text_layer_destroy(update_layer);
	gbitmap_destroy(settings_icon);
	action_bar_layer_destroy(window_action_bar);
}
Exemple #12
0
/* Deallocate persistent QTPlus items when watchface exits */
void qtp_app_deinit() {
#ifdef QTP_K_SUBSCRIBE
	bluetooth_connection_service_unsubscribe();
#endif
	gbitmap_destroy(qtp_battery_images[0]);
	gbitmap_destroy(qtp_battery_images[1]);
	gbitmap_destroy(qtp_battery_images[2]);
	gbitmap_destroy(qtp_bluetooth_image);
	app_sync_deinit(&qtp_sync);

}
Exemple #13
0
static void window_unload(Window *window) {
    app_sync_deinit(&sync);
    
    if (icon_bitmap) {
        gbitmap_destroy(icon_bitmap);
    }
    text_layer_destroy(datetime_layer);
    text_layer_destroy(readtime_layer);
    text_layer_destroy(bg_layer);
    text_layer_destroy(message_layer);
    bitmap_layer_destroy(icon_layer);
}
Exemple #14
0
void handle_deinit(void) {
   app_sync_deinit(&sync);
   battery_state_service_unsubscribe();
   tick_timer_service_unsubscribe();
   layer_destroy(line_layer);
   text_layer_destroy(text_time_layer);
   text_layer_destroy(text_date_layer);
   text_layer_destroy(text_watchbatt_layer);
   text_layer_destroy(text_event_layer);
   text_layer_destroy(text_location_layer);
   window_destroy(window);
}
Exemple #15
0
static void window_unload(Window *window) {
	app_sync_deinit(&sync);
	
	if (icon_id_bitmap) {
		gbitmap_destroy(icon_id_bitmap);
	}
	text_layer_destroy(mateocons_layer);
	text_layer_destroy(spot_name_layer);
	text_layer_destroy(surf_ht_layer);
	text_layer_destroy(water_temp_layer);
	text_layer_destroy(wind_layer);
	bitmap_layer_destroy(icon_id_layer);
	gbitmap_destroy(bmp_button_bar);
	bitmap_layer_destroy(button_bar_layer);
}
Exemple #16
0
/* Shut down the application
*/
void app_term(void)
{
    tick_timer_service_unsubscribe();
    text_layer_destroy(text_time_layer);
    text_layer_destroy(text_date_layer);
    text_layer_destroy(text_day_layer);
    text_layer_destroy(text_sun_layer);
    layer_destroy(line_layer);

    window_destroy(window);

    fonts_unload_custom_font(font_date);
    fonts_unload_custom_font(font_time);
    
    app_sync_deinit(&sync);
}
Exemple #17
0
static void window_unload(Window *window) {
  app_sync_deinit(&sync);

  if (icon_bitmap) {
    gbitmap_destroy(icon_bitmap);
  }

  text_layer_destroy(layer_route);
  text_layer_destroy(layer_eta);
  text_layer_destroy(layer_eta_mins_str);
  text_layer_destroy(layer_gps_str);
  text_layer_destroy(layer_destination);
  text_layer_destroy(layer_station);
  text_layer_destroy(layer_station_str);
  //  bitmap_layer_destroy(icon_layer);
}
static void deinit(void) {
  app_sync_deinit(&sync);

  tick_timer_service_unsubscribe();
  bluetooth_connection_service_unsubscribe();
  battery_state_service_unsubscribe();


  layer_remove_from_parent(bitmap_layer_get_layer(bluetooth_layer));
  bitmap_layer_destroy(bluetooth_layer);
  gbitmap_destroy(bluetooth_image);

	
  layer_remove_from_parent(bitmap_layer_get_layer(layer_batt_img));
  bitmap_layer_destroy(layer_batt_img);
  gbitmap_destroy(img_battery_100);
  gbitmap_destroy(img_battery_30);
  gbitmap_destroy(img_battery_00);
  gbitmap_destroy(img_battery_charge);	


	for (int i = 0; i < TOTAL_NORMAL_DIGITS; i++) {
    layer_remove_from_parent(bitmap_layer_get_layer(normal_time_digits_layers[i]));
    gbitmap_destroy(normal_time_digits_images[i]);
    normal_time_digits_images[i] = NULL;
    bitmap_layer_destroy(normal_time_digits_layers[i]);
	normal_time_digits_layers[i] = NULL;
  }
	
  text_layer_destroy( layer_date_text );
  text_layer_destroy( layer_ampm_text );
  fonts_unload_custom_font(date_font);

  //clearning MASK
  gbitmap_destroy(mask.bitmap_background);
  effect_layer_destroy(effect_layer_mask);
	

  layer_remove_from_parent(window_layer);
  layer_destroy(window_layer);
	

}
Exemple #19
0
static void main_window_unload(Window *window) {
    
    app_sync_deinit(&sync);
    
    
    // Unload GFont
    fonts_unload_custom_font(s_time_font);
    // Destroy TextLayer
    text_layer_destroy(s_time_layer);
    text_layer_destroy(s_current_session_layer);
    text_layer_destroy(s_upcoming_session_layer);
    
    // Destroy GBitmap
    gbitmap_destroy(s_background_bitmap);
    
    // Destroy BitmapLayer
    bitmap_layer_destroy(s_background_layer);
    
}
Exemple #20
0
static void window_unload(Window *window) {
  // Deinit sync
  app_sync_deinit(&sync);

  layer_destroy(rounded_layer);

  // Destroy the text layer
  text_layer_destroy(time_layer);

  // Destroy the wind_layer
  text_layer_destroy(wind_layer);

  // Destroy the temp_and_level_layer
  text_layer_destroy(temp_and_level_layer);

  // Destroy the wind_direction_layer
  text_layer_destroy(wind_direction_layer);
  
  text_layer_destroy(last_update_layer);
}
Exemple #21
0
void handle_deinit(void) 
{
	tick_timer_service_unsubscribe();
	bluetooth_connection_service_unsubscribe();
	// Destroy the date layer
	text_layer_destroy(s_data.day_label);
	text_layer_destroy(s_data.num_label);
	layer_destroy(s_data.date_layer);

	//destroy hands layer
	text_layer_destroy(s_data.sec_layer);
	text_layer_destroy(s_data.min_layer);
	text_layer_destroy(s_data.hour_layer);
	layer_destroy(s_data.hands_layer);

	//destroy bg layer
	layer_destroy(s_data.bg_layer);

	//destroy paths
	for (int i = 0; i < NUM_CLOCK_TICKS; ++i) 
	{
		gpath_destroy(s_data.tick_paths[i]);
	}	

	//destroy paths
	for (int i = 0; i < NUM_BT_LINES; ++i) 
	{
		gpath_destroy(s_data.bt_paths[i]);
	}	

	//destroy paths
	for (int i = 0; i < NUM_BAT_LINES; ++i) 
	{
		gpath_destroy(s_data.bat_paths[i]);
	}	
	// Destroy the window
	window_destroy(s_data.window);
	
	app_sync_deinit(&app);
}
Exemple #22
0
static void config_deinit(void) {
    app_sync_deinit(&s_sync);
}
Exemple #23
0
static void handle_window_unload(Window* window) {
    app_message_deregister_callbacks();
  app_sync_deinit(&sync); 
  text_layer_destroy(text_layer);
}
void controller_deinit() {
  app_sync_deinit(&s_sync);
}
Exemple #25
0
void handle_deinit(AppContextRef ctx) {
	app_sync_deinit(&sync);
}
static void deinit(void) {
  app_sync_deinit(&sync);
  
  tick_timer_service_unsubscribe();
  battery_state_service_unsubscribe();
  bluetooth_connection_service_unsubscribe();

  layer_remove_from_parent(bitmap_layer_get_layer(separator_layer));
  bitmap_layer_destroy(separator_layer);
  gbitmap_destroy(separator_image);
	
  layer_remove_from_parent(bitmap_layer_get_layer(bluetooth_layer));
  bitmap_layer_destroy(bluetooth_layer);
  gbitmap_destroy(bluetooth_image);
  
  bitmap_layer_destroy(layer_batt_img);
  gbitmap_destroy(img_battery_100);
  gbitmap_destroy(img_battery_90);
  gbitmap_destroy(img_battery_80);
  gbitmap_destroy(img_battery_70);
  gbitmap_destroy(img_battery_60);
  gbitmap_destroy(img_battery_50);
  gbitmap_destroy(img_battery_40);
  gbitmap_destroy(img_battery_30);
  gbitmap_destroy(img_battery_20);
  gbitmap_destroy(img_battery_10);
  gbitmap_destroy(img_battery_charge);	  
	
  fonts_unload_custom_font(custom_font);

  layer_remove_from_parent(bitmap_layer_get_layer(month_layer));
  bitmap_layer_destroy(month_layer);
  gbitmap_destroy(month_image);
		
  layer_remove_from_parent(bitmap_layer_get_layer(day_name_layer));
  bitmap_layer_destroy(day_name_layer);
  gbitmap_destroy(day_name_image);
	
  layer_remove_from_parent(bitmap_layer_get_layer(icon_layer));
  bitmap_layer_destroy(icon_layer);
  gbitmap_destroy(icon_bitmap);
	
  effect_layer_destroy(effect_layer_2);	

  if (effect_layer != NULL) {
	  effect_layer_destroy(effect_layer);
  }

  text_layer_destroy( temp_layer );

  layer_destroy(weather_holder);
	
	for (int i = 0; i < TOTAL_DATE_DIGITS; i++) {
    layer_remove_from_parent(bitmap_layer_get_layer(date_digits_layers[i]));
    gbitmap_destroy(date_digits_images[i]);
    bitmap_layer_destroy(date_digits_layers[i]);
  }

	for (int i = 0; i < TOTAL_SECONDS_DIGITS; i++) {
    layer_remove_from_parent(bitmap_layer_get_layer(seconds_digits_layers[i]));
    gbitmap_destroy(seconds_digits_images[i]);
    bitmap_layer_destroy(seconds_digits_layers[i]);
  }
	
   for (int i = 0; i < TOTAL_TIME_DIGITS; i++) {
    layer_remove_from_parent(bitmap_layer_get_layer(time_digits_layers[i]));
    gbitmap_destroy(time_digits_images[i]);
    bitmap_layer_destroy(time_digits_layers[i]);
  } 

	  window_destroy(window);

}
static void window_unload(Window *window) {
  app_sync_deinit(&sync);
  text_layer_destroy(aqi_value_layer);
  text_layer_destroy(time_layer);
}
Exemple #28
0
//when you close the app.
static void window_unload(Window *window) {
  //deinitialize app_sync.
  app_sync_deinit(&sync);
  //destroy textlayer.
  text_layer_destroy(direction_layer);
}
Exemple #29
0
static void window_unload(Window *window) {
  app_sync_deinit(&sync);



  text_layer_destroy(temperature_layer);}
/*----------------------------------------------------------------------------*/
static void window_unload(Window * window)
{
  APP_LOG(APP_LOG_LEVEL_INFO, "%s", __FUNCTION__);

  app_sync_deinit(&sync);
}