示例#1
0
static void main_window_unload(Window *window) {
  int i;
  for (i=0; i<TITLE_INDEX; i++)
    {
    text_layer_destroy(s_data_layer[i]);
    text_layer_destroy(s_data_title[i]);
  }
  
  layer_destroy(dataLayer);
  layer_destroy(titleLayer);
  text_layer_destroy(messageLayer);
  text_layer_destroy(s_data_layer[TITLE_INDEX]);  
  
  inverter_layer_destroy(inverter);
  inverter_layer_destroy(flash);
  
  bitmap_layer_destroy(s_padlockLayer);
  gbitmap_destroy(s_res_padlock);
  
  int jj;
  for (jj = 0; jj < 6; jj++) {
    inverter_layer_destroy(dataInverter[jj]);
  }
  
  fonts_unload_custom_font(s_2_font);
  fonts_unload_custom_font(s_4_font);
  fonts_unload_custom_font(s_6_font);
}
示例#2
0
// Program deinitializer
void deinit(void){
  // Destroy the text layer
  text_layer_destroy(hours_1st_layer);
  text_layer_destroy(hours_2nd_layer);
  text_layer_destroy(minutes_1st_layer);
  text_layer_destroy(minutes_2nd_layer);
  text_layer_destroy(seconds_1st_layer);
  text_layer_destroy(seconds_2nd_layer);
  text_layer_destroy(date_1st_layer);
  text_layer_destroy(date_2nd_layer);
  text_layer_destroy(date_3rd_layer);
  text_layer_destroy(date_4th_layer);
  text_layer_destroy(day_of_week_layer);
  text_layer_destroy(s_weather_layer);
  text_layer_destroy(s_battery_info_layer);
  text_layer_destroy(date_delimiter_layer);
  
  // Destroy graphics
  gbitmap_destroy(s_time_angles_bmp);
  gbitmap_destroy(s_seconds_arows_bmp);
  bitmap_layer_destroy(s_time_angles_layer);
  bitmap_layer_destroy(s_seconds_arows_layer);
  gbitmap_destroy(s_battery_lightning_bmp);
  bitmap_layer_destroy(s_battery_lightning_layer);
  
  // Unload fonts
  fonts_unload_custom_font(s_orbitron_font_36);
  fonts_unload_custom_font(s_orbitron_font_20);
  fonts_unload_custom_font(s_orbitron_font_15);
  
  // Destroy the window
  window_destroy(window);
}
示例#3
0
void handle_deinit(void) {
  tick_timer_service_unsubscribe();

  persist_write_string(MESSAGE_KEY_DATE_FORMAT_KEY,       PersistDateFormat);
  persist_write_int(MESSAGE_KEY_BT_VIBRATE_KEY,           PersistBTLoss);
  persist_write_int(MESSAGE_KEY_LOW_BATTERY_KEY,          PersistLow_Batt);
  
  battery_state_service_unsubscribe();
  bluetooth_connection_service_unsubscribe();
  app_focus_service_unsubscribe();

  text_layer_destroy(text_time_layer);
  text_layer_destroy(text_date_layer);
  text_layer_destroy(text_dayname_layer);
  text_layer_destroy(text_battery_layer);

  layer_destroy(BatteryLineLayer);
  layer_destroy(BTLayer);

  gbitmap_destroy(image);
  bitmap_layer_destroy(image_layer);

  fonts_unload_custom_font(fontHelvNewLight20);
  fonts_unload_custom_font(fontRobotoBoldSubset40);
  fonts_unload_custom_font(fontRobotoBoldSubset45);


  window_destroy(window);
}
示例#4
0
static void main_window_unload(Window *window) {
  // Destroy TextLayer
  text_layer_destroy(s_time_layer);
  text_layer_destroy(s_date_layer);
  // Unload GFont
  fonts_unload_custom_font(s_time_font);
  fonts_unload_custom_font(s_date_font);
  fonts_unload_custom_font(s_summary_font);
  // Destroy Weather Icon
  gbitmap_destroy(s_weather_bitmap);
  // Destroy Weather Icon Layer
  bitmap_layer_destroy(s_weather_bitmap_layer);
  // Destroy Weather Text Layer
  text_layer_destroy(s_weather_text_layer);
  // Destroy Weather Summary Layer
  text_layer_destroy(s_weather_summary_layer);
  // Destroy summary days layers
  text_layer_destroy(s_day_summary_first_day_layer);
  text_layer_destroy(s_day_summary_second_day_layer);
  // Destroy summary temperature layers
  text_layer_destroy(s_day_summary_text_first_layer);
  text_layer_destroy(s_day_summary_text_second_layer);
  // Destroy summary Icons
  gbitmap_destroy(s_day_summary_first);
  bitmap_layer_destroy(s_day_summary_first_layer);
  gbitmap_destroy(s_day_summary_second);
  bitmap_layer_destroy(s_day_summary_second_layer);
  // Destroy Weather Day Summary Layer
  layer_destroy(s_weather_day_summary_layer);
}
示例#5
0
static void handle_deinit( AppContextRef ctx )
{
    ( void ) ctx;
    
    fonts_unload_custom_font( font_time );
    fonts_unload_custom_font( font_date );
}
示例#6
0
static void main_window_unload(Window *window) {
  int i;

  enabled = 0;
  
  battery_state_service_unsubscribe();
  
  if (s_dow_text_layer) {
    text_layer_destroy(s_dow_text_layer);
    s_dow_text_layer = NULL;
  }
  if (s_batt_text_layer) {
    text_layer_destroy(s_batt_text_layer);
    s_batt_text_layer = NULL;
  }
  if (s_date_text_layer) {
    text_layer_destroy(s_date_text_layer);
    s_date_text_layer = NULL;
  }
  if (s_time_text_layer) {
    text_layer_destroy(s_time_text_layer);
    s_time_text_layer = NULL;
  }
  if (has_small_font) {
    fonts_unload_custom_font(s_small_font);
    has_small_font = 0;
    s_small_font = NULL;
  }
  if (has_large_font) {
    fonts_unload_custom_font(s_large_font);
    has_large_font = 0;
    s_large_font = NULL;
  }

}
示例#7
0
static void handle_deinit() {
  app_message_deregister_callbacks();
  battery_state_service_unsubscribe();
  tick_timer_service_unsubscribe();
  fonts_unload_custom_font(font);
  fonts_unload_custom_font(font2);
  gpath_destroy(min_path);
  gpath_destroy(hour_path);
  gpath_destroy(hour_in_path);
  text_layer_destroy(battp_layer);
  text_layer_destroy(date_layer);
  text_layer_destroy(day_layer);
  text_layer_destroy(time_layer);
  layer_destroy(hands_layer);
  bitmap_layer_destroy(logo_layer);
  gbitmap_destroy(logo);
  bitmap_layer_destroy(battery_layer);
  for (int i = 0; i < 22; i++)
    gbitmap_destroy(battery_images[i]);
  bitmap_layer_destroy(bluetooth_layer);
  for (int i = 0; i < 2; i++)
    gbitmap_destroy(bluetooth_images[i]);
  layer_destroy(background_layer);
  window_destroy(window);
}
示例#8
0
static void main_window_unload(Window *window) {
  // Destroy TextLayer
    text_layer_destroy(s_time_layer);
    text_layer_destroy(s_bg_layer);
    text_layer_destroy(am_layer);
    text_layer_destroy(date_layer);
    text_layer_destroy(s_battery_layer);
    text_layer_destroy(hour_layer);
    text_layer_destroy(min_layer);
    text_layer_destroy(condition_layer);
    text_layer_destroy(temp_layer);
    text_layer_destroy(city_layer);
    text_layer_destroy(battery_text_layer);
    /*text_layer_destroy(s_temperature_layer);
    bitmap_layer_destroy(s_bitmap_layer);
    bitmap_layer_destroy(s_icon_layer);
    bitmap_layer_destroy(bt_layer);*/
    fonts_unload_custom_font(s_custom_font_24);
    fonts_unload_custom_font(s_custom_font_18);
    fonts_unload_custom_font(s_custom_font_12);
    //gbitmap_destroy(blank_bitmap);
    //gbitmap_destroy(bt_bitmap);
    gbitmap_destroy(no_phone_bitmap);
    bitmap_layer_destroy(no_phone_layer);
    bluetooth_connection_service_unsubscribe();
    battery_state_service_unsubscribe();
    tick_timer_service_unsubscribe();
}
示例#9
0
void handle_deinit(void) {
    app_timer_cancel(g_timer);

    APP_LOG(APP_LOG_LEVEL_DEBUG, "SHUTDOWN:");
    APP_LOG(APP_LOG_LEVEL_DEBUG, "  pre: %u bytes used", (unsigned) heap_bytes_used());

    free(g_holomesh);

    APP_LOG(APP_LOG_LEVEL_DEBUG, "  holomesh cleaned up: %u bytes remaining", (unsigned) heap_bytes_used());

    gbitmap_destroy(frameBufferBitmap);
    gbitmap_destroy(logoBitmap);

    APP_LOG(APP_LOG_LEVEL_DEBUG, "  bitmaps cleaned up: %u bytes remaining", (unsigned) heap_bytes_used());

    fonts_unload_custom_font(g_font_sw_symbol);
    fonts_unload_custom_font(g_font_sw);

    APP_LOG(APP_LOG_LEVEL_DEBUG, "  fonts cleaned up: %u bytes remaining", (unsigned) heap_bytes_used());

    text_layer_destroy(timeLayer);
    text_layer_destroy(dateLayer);
    text_layer_destroy(textLayer);
    text_layer_destroy(textLayerSym);
    text_layer_destroy(infoTextLayer);
    bitmap_layer_destroy(frameBufferLayer);
    bitmap_layer_destroy(logoLayer);

    APP_LOG(APP_LOG_LEVEL_DEBUG, "  layers cleaned up: %u bytes remaining", (unsigned) heap_bytes_used());

    window_destroy(my_window);

    APP_LOG(APP_LOG_LEVEL_DEBUG, "FINAL SHUTDOWN: %u bytes used", (unsigned) heap_bytes_used());
}
示例#10
0
void handle_deinit(void) {

  fonts_unload_custom_font(mTimeFont);

  //fonts_unload_custom_font(mDateFont);
	fonts_unload_custom_font(mTemperatureFont);

	//fonts_unload_custom_font(mHighLowFont);

  layer_remove_from_parent(bitmap_layer_get_layer(mWeatherIconLayer));
  bitmap_layer_destroy(mWeatherIconLayer);
  gbitmap_destroy(mWeatherIcon);

  layer_remove_from_parent(bitmap_layer_get_layer(battery_image_layer));
  bitmap_layer_destroy(battery_image_layer);
  gbitmap_destroy(battery_image);
  battery_image = NULL;
  
  tick_timer_service_unsubscribe();
  bluetooth_connection_service_unsubscribe();
  battery_state_service_unsubscribe();
 
  text_layer_destroy(mHighLowLayer);
  text_layer_destroy(mTimeSeparatorLayer);
  text_layer_destroy(mTemperatureLayer);
  text_layer_destroy(mDateLayer);
  text_layer_destroy(mTimeMinutesLayer);
  text_layer_destroy(mTimeHourLayer);
  layer_destroy(mTimeLayer);
  layer_destroy(mBackgroundLayer);
  remove_invert_top();
  remove_invert_bottom();  
  
  window_destroy(mWindow);
}
示例#11
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 );
}
void destroy_display() {
	text_layer_destroy(text_layer_rt_title);
	text_layer_destroy(text_layer_d_title);
	text_layer_destroy(text_layer_ts_title);
	fonts_unload_custom_font(font_square_s);
	fonts_unload_custom_font(font_square_m);
	fonts_unload_custom_font(font_square_l);
}
示例#13
0
static void window_unload(Window *window) {
    fonts_unload_custom_font(time_font);
    text_layer_destroy(time_layer);
    fonts_unload_custom_font(text_font);
    text_layer_destroy(text_layer);
    gbitmap_destroy(arrow_image);
    bitmap_layer_destroy(image_layer);
}
示例#14
0
文件: main.c 项目: jebrial/woopface
static void main_window_unload(Window *window) {
  text_layer_destroy(s_time_layer);
  text_layer_destroy(s_trending_layer);
  fonts_unload_custom_font(s_time_font);
  fonts_unload_custom_font(s_trending_layer);
  gbitmap_destroy(s_background_bitmap);
  bitmap_layer_destroy(s_background_layer);
}
示例#15
0
static void window_unload(Window *window) 
{
    app_timer_cancel(timer);
    fonts_unload_custom_font(mTimeFont);
    fonts_unload_custom_font(mTimeFontBold);
    fonts_unload_custom_font(mSmallFont);
    fonts_unload_custom_font(mTinyFont);
    layer_destroy(canvas);
}
static void do_deinit(void) {
    tick_timer_service_unsubscribe();
    window_destroy(s_data.window);
    text_layer_destroy(s_data.hours);
    text_layer_destroy(s_data.middles);
    text_layer_destroy(s_data.offsets);
    fonts_unload_custom_font(hours_font);
    fonts_unload_custom_font(regular_font);
}
示例#17
0
文件: main.c 项目: chemu/BarGraph
static void main_window_unload(Window *window) {
  text_layer_destroy(s_time_layer);
  fonts_unload_custom_font(s_time_font);
  text_layer_destroy(s_date_layer);
  fonts_unload_custom_font(s_date_font);
  layer_destroy(s_bar_layer);
  layer_destroy(s_bt_layer);
  gbitmap_destroy(s_bt_bitmap);

}
示例#18
0
void unload_face_fonts() {
    if (loaded_font != SYSTEM_FONT) {
        APP_LOG(APP_LOG_LEVEL_DEBUG, "Unloading custom fonts. %d%03d", (int)time(NULL), (int)time_ms(NULL, NULL));
        fonts_unload_custom_font(time_font);
        fonts_unload_custom_font(medium_font);
        fonts_unload_custom_font(base_font);
    }
    fonts_unload_custom_font(weather_font);
    fonts_unload_custom_font(custom_font);
}
示例#19
0
static void
handle_deinit(
			  AppContextRef ctx
			  )
{
	(void) ctx;
	
	fonts_unload_custom_font(font_thin);
	fonts_unload_custom_font(font_thick);
}
示例#20
0
文件: Snowy.c 项目: Jnmattern/Snowy
static void deinit(void) {
	accel_tap_service_unsubscribe();
	accel_data_service_unsubscribe();
	if (timer != NULL) app_timer_cancel(timer);
	tick_timer_service_unsubscribe();
	layer_destroy(layer);
  fonts_unload_custom_font(fontHour);
  fonts_unload_custom_font(fontDate);
	window_destroy(window);
}
示例#21
0
void handle_deinit(AppContextRef ctx) {
  (void)ctx;

  rotbmp_pair_deinit_container(&watchface_container);
  rotbmp_pair_deinit_container(&bitmap_hour_container);

  fonts_unload_custom_font(fontSmall);
  fonts_unload_custom_font(fontBig);
  fonts_unload_custom_font(fontMoonPhases);
}
示例#22
0
文件: main.c 项目: poodle230/xface
static void main_window_unload(Window *window) {
  // Unload fonts
  fonts_unload_custom_font(s_font36);
  fonts_unload_custom_font(s_font18);
  
  // Destroy TextLayer
  text_layer_destroy(s_time_layer);
  text_layer_destroy(s_step_layer);
  text_layer_destroy(s_date_layer);
}
示例#23
0
void set_fonts(void) {
	if (font_label.isCustom)
		fonts_unload_custom_font(font_label.font);

	if (font_pin.isCustom)
		fonts_unload_custom_font(font_pin.font);
	
	switch(font_style)
	{
		case 1 :
			font_label.font = fonts_get_system_font(FONT_KEY_GOTHIC_24);
			font_label.isCustom = false;
			font_pin.font = fonts_get_system_font(FONT_KEY_BITHAM_34_MEDIUM_NUMBERS);
			font_pin.isCustom = false;
			text_label_rect.origin.y = single_text_label_rect.origin.y;
			text_label_rect.size.h = single_text_label_rect.size.h - 6;
			text_pin_rect.size.h = single_text_pin_rect.size.h;
			text_pin_rect.origin.y = single_text_pin_rect.origin.y - 4;
			break;
		case 2 :
			font_label.font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_DIGITAL_30));
			font_label.isCustom = true;
			font_pin.font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_DIGITAL_42));
			font_pin.isCustom = true;
			text_label_rect.origin.y = single_text_label_rect.origin.y + 2;
			text_label_rect.size.h = single_text_label_rect.size.h + 4;
			text_pin_rect.size.h = single_text_pin_rect.size.h;
			text_pin_rect.origin.y = single_text_pin_rect.origin.y - 6;
			break;
		case 3 :
			font_label.font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_BD_CARTOON_20));
			font_label.isCustom = true;
			font_pin.font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_BD_CARTOON_30));
			font_pin.isCustom = true;
			text_label_rect.origin.y = single_text_label_rect.origin.y + 4;
			text_label_rect.size.h = single_text_label_rect.size.h - 14;
			text_pin_rect.size.h = single_text_pin_rect.size.h;
			text_pin_rect.origin.y = single_text_pin_rect.origin.y - 2;
			break;
		default :
			font_style = 0;
			font_label.font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_ORBITRON_28));
			font_label.isCustom = true;
			font_pin.font = fonts_load_custom_font(resource_get_handle(RESOURCE_ID_FONT_BITWISE_32));
			font_pin.isCustom = true;
			text_label_rect.origin.y = single_text_label_rect.origin.y;
			text_label_rect.size.h = single_text_label_rect.size.h;
			text_pin_rect.size.h = single_text_pin_rect.size.h;
			text_pin_rect.origin.y = single_text_pin_rect.origin.y;
			break;
	}
	text_layer_set_font(text_label_layer, font_label.font);
	text_layer_set_font(text_pin_layer, font_pin.font);
	fonts_changed = false;
}
示例#24
0
static void window_unload(Window *window) {
  layer_destroy(s_simple_bg_layer);
  layer_destroy(s_hands_layer);
  gbitmap_destroy(clock_bitmap);
  bitmap_layer_destroy(clock_layer);
  fonts_unload_custom_font(s_date_font);
  fonts_unload_custom_font(s_time_font);
  text_layer_destroy(date_layer);
  text_layer_destroy(time_layer);

}
示例#25
0
static void main_window_unload(Window *window) {
  tick_timer_service_unsubscribe();

  time_window_unload(window);
  date_window_unload(window);
  weather_window_unload(window);
  
  fonts_unload_custom_font(g_large_font);
  fonts_unload_custom_font(g_medium_font);
  fonts_unload_custom_font(g_small_font);
}
示例#26
0
文件: main.c 项目: b100w11/ura.epoch
static void main_window_unload(Window *window) {
  // Unload GFont
  fonts_unload_custom_font(s_time_font);
  fonts_unload_custom_font(s_date_font);
  
  // Destroy TextLayers
  text_layer_destroy(s_time_layer);
  //text_layer_destroy(s_utc_time_layer);
  text_layer_destroy(s_date_layer);
  text_layer_destroy(s_epoch_layer);   
}
示例#27
0
static void window_unload(Window *window) {
  text_layer_destroy(text_time_layer);
  text_layer_destroy(text_price_layer);

  gbitmap_destroy(image);
  layer_remove_from_parent(bitmap_layer_get_layer(image_layer));
  bitmap_layer_destroy(image_layer);

  fonts_unload_custom_font(font18);
  fonts_unload_custom_font(font24);
}
static void main_window_unload(Window *window) {
    fonts_unload_custom_font(time_font);
    fonts_unload_custom_font(seconds_font);
    fonts_unload_custom_font(date_font);
    fonts_unload_custom_font(battery_font);
    text_layer_destroy(time_layer);
    text_layer_destroy(seconds_layer);
    text_layer_destroy(date_layer);
    text_layer_destroy(battery_text_layer);
    gbitmap_destroy(bt_icon_bitmap);
    bitmap_layer_destroy(bt_icon_layer);
}
示例#29
0
static void main_window_unload(Window *window) {
	
	//Unload GFonts
	fonts_unload_custom_font(s_hour_font);
	fonts_unload_custom_font(s_minutes_font);
	
	//Destroy hour layer
	text_layer_destroy(s_hour_layer);
	//Destroy minutes layer
	text_layer_destroy(s_minutes_layer);
	
}
示例#30
0
static void main_window_unload(Window *window) {
    text_layer_destroy(s_timehours_layer);
    text_layer_destroy(s_timemins_layer);
    text_layer_destroy(s_time_ampm_layer);
    text_layer_destroy(s_steps_layer);
    text_layer_destroy(s_day_layer);
    layer_destroy(s_battery_layer);
    fonts_unload_custom_font(s_timehour_font);
    fonts_unload_custom_font(s_timemin_font);
    fonts_unload_custom_font(s_smaller_font);
    fonts_unload_custom_font(s_timeampm_font);
}