예제 #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
void ftUnload(Window *window) {

  text_layer_destroy(ftHoursLayer);
  inverter_layer_destroy(ftHoursInverterLayer);
  text_layer_destroy(ftColonLayer);
  text_layer_destroy(ftMinsLayer);
  inverter_layer_destroy(ftMinsInverterLayer);

  setCommonUnload();
}
예제 #3
0
void rdUnload(Window *window) {

  text_layer_destroy(rdIntegerLayer);
  inverter_layer_destroy(rdIntegerInverterLayer);
  text_layer_destroy(rdDecimalPointLayer);
  text_layer_destroy(rdTenthsLayer);
  inverter_layer_destroy(rdTenthsInverterLayer);

  setCommonUnload();
}
예제 #4
0
void deinit() {

  // http://forums.getpebble.com/discussion/12927/app-crashes-on-2-1-double-free-detected
	//window_destroy(window);
	gbitmap_destroy(background_image_container);
	gbitmap_destroy(icon_battery);
	gbitmap_destroy(icon_battery_charge);
	gbitmap_destroy(icon_bt);
	text_layer_destroy(date_layer);
	layer_destroy(minute_display_layer);
	layer_destroy(hour_display_layer);
	layer_destroy(center_display_layer);
	layer_destroy(second_display_layer);
	layer_destroy(battery_layer);
	layer_destroy(bt_layer);
  deinit_double_time();

#ifdef INVERSE
	inverter_layer_destroy(full_inverse_layer);
#endif

	layer_destroy(background_layer);
	layer_destroy(window_layer);

	gpath_destroy(hour_hand_path);
	gpath_destroy(minute_hand_path);
}
예제 #5
0
파일: Aviator.c 프로젝트: paddy2k/aviator
static void remove_invert() {
    if (inverter_layer != NULL) {
		layer_remove_from_parent(inverter_layer_get_layer(inverter_layer));
		inverter_layer_destroy(inverter_layer);
		inverter_layer = NULL;
    }
}
예제 #6
0
void handle_deinit() {
  app_message_deregister_callbacks();
  battery_state_service_unsubscribe();
  tick_timer_service_unsubscribe();
  if (has_config) {
    persist_write_int(SECONDS_MODE, seconds_mode);
    persist_write_int(BATTERY_MODE, battery_mode);
    persist_write_int(DATE_MODE, date_mode);
    persist_write_int(BLUETOOTH_MODE, bluetooth_mode);
    APP_LOG(APP_LOG_LEVEL_DEBUG, "Wrote config");
  } else {
    APP_LOG(APP_LOG_LEVEL_DEBUG, "Did not write config");
  }
  fonts_unload_custom_font(font);
  gpath_destroy(sec_path);
  gpath_destroy(min_path);
  gpath_destroy(hour_path);
  inverter_layer_destroy(inverter_layer);
#if DEBUG
  text_layer_destroy(debug_layer);
#endif
  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);
  layer_destroy(date_layer);
  window_destroy(window);
}
예제 #7
0
파일: main.c 프로젝트: krisjhamilton/Pebble
void window_unload(Window *window)
{
    //We will safely destroy the Window's elements here!
    text_layer_destroy(text_layer);
 
    inverter_layer_destroy(inv_layer);
}
예제 #8
0
void sdUnload(Window *window) {

  text_layer_destroy(splitDistLayer);
  inverter_layer_destroy(splitDistInverterLayer);

  setCommonUnload();
}
예제 #9
0
파일: main.c 프로젝트: yatul/ModernExtra20
void deinit() {

	//window_destroy(window);
	gbitmap_destroy(background_image_container);
	gbitmap_destroy(icon_battery);
	gbitmap_destroy(icon_battery_charge);
	gbitmap_destroy(icon_bt);
	text_layer_destroy(date_layer);
	layer_destroy(minute_display_layer);
	layer_destroy(hour_display_layer);
	layer_destroy(center_display_layer);
	layer_destroy(second_display_layer);
	layer_destroy(battery_layer);
	layer_destroy(bt_layer);

#ifdef INVERSE
	inverter_layer_destroy(full_inverse_layer);
#endif

	layer_destroy(background_layer);
	layer_destroy(window_layer);

	gpath_destroy(hour_hand_path);
	gpath_destroy(minute_hand_path);
}
예제 #10
0
void destroy_frame(void){
	bitmap_layer_destroy(sine_layer);
	layer_destroy(sun_layer);
	inverter_layer_destroy(horizon_layer);
	gbitmap_destroy(sine_thick);
	gbitmap_destroy(sine_thin);
}
예제 #11
0
static void display_time(struct tm *tick_time) {
    
    // TODO: Use `units_changed` and more intelligence to reduce
    //       redundant digit unload/load?
	
	// This is to make sure the screen is not refreshed every second
	if (tick_time->tm_min != min)  {
		if (was_BTconnected_last_time)  {
			window_set_background_color(window, background_color);
			display_value(get_display_hour(tick_time->tm_hour), 0, false);
			display_value(tick_time->tm_min, 1, true);
			min = tick_time->tm_min;
		}
		else  {
			// Destroy previous inverter layer to make sure there's no inverted spot if first digit is missing (ie: " 0:12")
			inverter_layer_destroy(inv_layer);
			window_set_background_color(window, background_color);
			display_value(get_display_hour(tick_time->tm_hour), 0, false);
			display_value(tick_time->tm_min, 1, true);
			min = tick_time->tm_min;
			//Inverter layer
			inv_layer = inverter_layer_create(GRect(0, 0, 144, 168));
			layer_add_child(window_get_root_layer(window), (Layer*) inv_layer);	
		}		
	}
}
예제 #12
0
static void destroy_ui(void) {
  window_destroy(s_window);
  inverter_layer_destroy(s_inverterlayer_1);
  text_layer_destroy(s_stop_name_layer);
  text_layer_destroy(s_direction_layer);
  menu_layer_destroy(s_train_menu);
}
예제 #13
0
파일: main.c 프로젝트: gordski/DateFace
void handle_deinit(void) {
  text_layer_destroy(week_day_layer);
  text_layer_destroy(day_of_month_layer);
  text_layer_destroy(month_layer);
  inverter_layer_destroy(inverter_layer);
  window_destroy(my_window);
}
예제 #14
0
파일: tippy2.c 프로젝트: Med116/tippy
static void window_unload(Window *window) {
  text_layer_destroy(temp_layer);
  text_layer_destroy(plus_layer);
  text_layer_destroy(minus_layer);
  text_layer_destroy(total_layer);
  text_layer_destroy(total_label);
  text_layer_destroy(tip_layer);
  text_layer_destroy(tip_label);
  inverter_layer_destroy(inverter_layer);
  inverter_layer_destroy(results_inverter_layer);
  text_layer_destroy(results_layer);
  layer_destroy(path_layer);
  layer_destroy(results_path_layer);
  gbitmap_destroy(up_down_icon);
  bitmap_layer_destroy(image_layer);
}
예제 #15
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 selection_layer_deinit(Layer* layer) {
#ifndef PBL_COLOR
  SelectionLayerData *data = layer_get_data(layer);
  inverter_layer_destroy(data->inverter);
#endif

  layer_destroy(layer);
}
예제 #17
0
// destroy objects
static void main_window_unload(Window *window) {
  text_layer_destroy(s_time_layer);
  text_layer_destroy(s_text_layer);
  gbitmap_destroy(s_logo_bitmap);
  bitmap_layer_destroy(s_logo_layer);
  inverter_layer_destroy(s_invert_layer);
  accel_tap_service_unsubscribe();
}
예제 #18
0
void handle_deinit() {
  for (int i = 0; i < TOTAL_IMAGE_SLOTS; i++) {
    unload_digit_image_from_slot(i);
    bitmap_layer_destroy(image_containers[i]);
  }
  inverter_layer_destroy(inverter_layer);
  window_destroy(window);
  autoconfig_deinit();
}
예제 #19
0
void window_unload_main(Window *window){
	text_layer_destroy(first_word_t);
	text_layer_destroy(second_word_t);
	text_layer_destroy(third_word_t);
	text_layer_destroy(fourth_word_t);
	text_layer_destroy(slot_t);
	text_layer_destroy(seconds_t);
	inverter_layer_destroy(theme);
}
예제 #20
0
파일: main.c 프로젝트: turnervink/CUTOFF
static void main_window_unload(Window *window) {
  // Destroy TextLayer
  text_layer_destroy(s_hour_layer);
  text_layer_destroy(s_minute_layer);
  layer_destroy(s_line_layer);
  text_layer_destroy(date_layer);
  #ifdef PBL_BW 
  inverter_layer_destroy(s_inv_layer);
  #endif
}
예제 #21
0
void auxiliary_layer_destroy(AuxiliaryLayer* auxiliary_layer) {
    if(auxiliary_layer->inverter_layer != NULL) {
        inverter_layer_destroy(auxiliary_layer->inverter_layer);
    }
    
    layer_destroy(auxiliary_layer->layer);
    layer_destroy(auxiliary_layer->root_layer);
    
    free(auxiliary_layer);
}
예제 #22
0
static void window_unload(Window *window) {
    text_layer_destroy(hostname_text);
    text_layer_destroy(cpu_usage_text);
    text_layer_destroy(mem_usage_text);
    text_layer_destroy(ip_text);
    text_layer_destroy(port_text);
    text_layer_destroy(debug_text);
    inverter_layer_destroy(iLayer);
    progress_bar_destroy(progress_bar_cpu);
    progress_bar_destroy(progress_bar_mem);
}
예제 #23
0
파일: main.c 프로젝트: imclab/rest
static void destroy_ui(void) {
  window_destroy(s_window);
  action_bar_layer_destroy(s_actionbarlayer_main);
  text_layer_destroy(s_textlayer_120);
  text_layer_destroy(s_textlayer_60);
  text_layer_destroy(s_textlayer_90);
  text_layer_destroy(s_textlayer_count);
  text_layer_destroy(s_textlayer_over);
  inverter_layer_destroy(s_inverterlayer_theme);
  gbitmap_destroy(s_res_image_go);
}
예제 #24
0
// De-Initialise UI
static void deinit(void) {
	accel_data_service_unsubscribe();
	app_timer_cancel(show_time);
	app_timer_cancel(inverter_timer);
	app_timer_cancel(time_timer);
  bitmap_layer_destroy(static_1_bitmap);
  text_layer_destroy(time_layer);
  inverter_layer_destroy(static_inverter_layer);
  gbitmap_destroy(s_res_static_1_image);
  window_stack_remove(window, false);
  window_destroy(window);
}
예제 #25
0
파일: main.c 프로젝트: zenwheel/zenface
void handle_deinit(void) {
	text_layer_destroy(text_layer);
	text_layer_destroy(time_layer);
	//text_layer_destroy(date_layer);
	inverter_layer_destroy(inverter_layer);
	
	battery_state_service_unsubscribe();
	bluetooth_connection_service_unsubscribe();
	tick_timer_service_unsubscribe();
	
	window_destroy(window);
}
예제 #26
0
static void main_window_unload(Window *window) {
	layer_destroy(s_clock_layer_outer);
	layer_destroy(s_clock_layer_center);
	layer_destroy(s_clock_layer_inner);

	text_layer_destroy(s_text_time);

	inverter_layer_destroy(s_layer_invert);

	gpath_destroy(s_hand_path_outer);
	gpath_destroy(s_hand_path_center);
	gpath_destroy(s_hand_path_inner);
}
예제 #27
0
void window_unload(Window *window)
{
  //destroy window elements
  text_layer_destroy(text_layer);
  //text_layer_destroy(hour_layer);
  
  inverter_layer_destroy(inv_layer);
  gbitmap_destroy(seahawks_bitmap);
  bitmap_layer_destroy(seahawks_layer);
  gbitmap_destroy(trophy_bitmap);
  bitmap_layer_destroy(trophy_layer);
  bitmap_layer_destroy(feather_layer_top);
  bitmap_layer_destroy(feather_layer_bottom);
}
예제 #28
0
static void deinit() {
    for (int i = 0; i < TOTAL_IMAGE_SLOTS; i++) {
        unload_digit_image_from_slot(i);
    }    
    window_destroy(window);
	// Destroy inverter if last screen was inverted
	if (!(was_BTconnected_last_time))  {
		inverter_layer_destroy(inv_layer);
	}
	qtp_app_deinit();
	tick_timer_service_unsubscribe();
	bluetooth_connection_service_unsubscribe();
//	battery_state_service_unsubscribe();	
}
예제 #29
0
void set_invert_color(bool invert) {
  if (invert && inverter_layer == NULL) {
    // Add inverter layer
    Layer *window_layer = window_get_root_layer(window);

    inverter_layer = inverter_layer_create(GRect(0, 0, 144, 168));
    layer_add_child(window_layer, inverter_layer_get_layer(inverter_layer));
  } else if (!invert && inverter_layer != NULL) {
    // Remove Inverter layer
    layer_remove_from_parent(inverter_layer_get_layer(inverter_layer));
    inverter_layer_destroy(inverter_layer);
    inverter_layer = NULL;
  }
  // No action required
}
예제 #30
0
static void window_unload(Window *window) 
{
  //Time
  text_layer_destroy(time_label);
  text_layer_destroy(time_layer);

  //Date
  text_layer_destroy(date_label);
  text_layer_destroy(date_layer);

  //Prompt
  text_layer_destroy(prompt_label);
  inverter_layer_destroy(prompt_layer);
  
}