您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ window_stack_pop函数代码示例

51自学网 2021-06-03 09:58:12
  C++
这篇教程C++ window_stack_pop函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中window_stack_pop函数的典型用法代码示例。如果您正苦于以下问题:C++ window_stack_pop函数的具体用法?C++ window_stack_pop怎么用?C++ window_stack_pop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了window_stack_pop函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: reply_select_callback

// Here we capture when a user selects a menu itemvoid reply_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *data) {    ReplyWindow * rw = (ReplyWindow*)data;    #ifndef PBL_PLATFORM_APLITE        if (rw->replies==&dictationFailedRL) {        window_stack_pop(false);        return;    }#endif        APP_LOG(APP_LOG_LEVEL_DEBUG,"You clicked on %s" ,            rw->replies->values[cell_index->row]);        int row = cell_index->row;    if (strcmp(rw->replies->values[row],"Dictate")==0) {#ifndef PBL_PLATFORM_APLITE        dictation_session_start(dictsess);#endif    } else if (strcmp(rw->replies->values[row],"Emoji")==0) {        emojiRL.values=emojiList;        emojiRL.num=ARRAY_LENGTH(emojiList);        replywindow_create(rw->replyChan,rw->replyTo,&emojiRL);    } else {                static char msg[100];        snprintf(msg,100,"%s%c%s%s", rw->replyChan->id,0x7f,rw->replyTo,rw->replies->values[row]);        sendCommand("MESSAGE",msg);        bool pop2 = rw->replies->values==emojiList;        window_stack_pop(false);        if (pop2) {            window_stack_pop(false);        }    }}
开发者ID:Mevin1,项目名称:slabforpebble,代码行数:36,


示例2: headingSelected

void headingSelected(NumberWindow *window,  void * context){;	static char msg[20];	snprintf(msg, 20,  "%d;%d",selectedIndex,(int) number_window_get_value(window));    send_to_phone( MyTupletCString(105, msg)); //index maps to courseIdx!	vibes_short_pulse();	number_window_destroy(degrees_window);	window_stack_pop(true); //close this window (number window)	window_stack_pop(true); //close this window (course menu)}
开发者ID:StarTraX,项目名称:tactician,代码行数:10,


示例3: menu_select_click_callback

static void menu_select_click_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *data ) {    switch(cell_index->row) {        case 0: {            window_stack_pop(true);            answer_question(QUESTION_ANSWER_SKIP);            break;        }        case 1: {            window_stack_pop(true);            answer_question(QUESTION_ANSWER_REPORT);            break;        }    }}
开发者ID:einfallstoll,项目名称:PebbleVote-App,代码行数:14,


示例4: shake_handler

void shake_handler(AccelAxisType axis, int32_t direction){	switch(main_settings.shakeAction){		case SHAKE_USE_CHANGE_SWEAR_WORD:			app_timer_cancel(animate_word_timer);			app_timer_cancel(update_word_timer);			animate_word_timer = app_timer_register(50, fire_animation_callback, NULL);			update_word_timer = app_timer_register(850, update_word_callback, NULL);			break;		case SHAKE_USE_LAUNCH_EXTRA_SCREEN:			if(!extra_window_is_loaded()){				extra_window_update_settings(main_settings);				window_stack_push(extra_window_get_window(), true);			}			else{				window_stack_pop(true);			}			break;		case SHAKE_USE_SIMPLICITY:			if(simplicity_is_loaded()){				simplicity_pop();				tick_timer_service_subscribe(SECOND_UNIT, tick_handler);			}			else{				tick_timer_service_unsubscribe();				simplicity_push();			}			break;	}}
开发者ID:tnt944445,项目名称:drunkoclock,代码行数:29,


示例5: ease_menu_select_callback

static void ease_menu_select_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *data) {   if (cell_index->row == 0) {	   send(KEY_EASE, 1);   }   switch(s_ease) {    case 2:      if(cell_index->row == 1) {        send(KEY_EASE, 3);      }      break;    case 3:      if(cell_index->row == 1) {        send(KEY_EASE, 3);      }      else if(cell_index->row == 2) {        send(KEY_EASE, 4);      }      break;    case 4:      if(cell_index->row == 1) {        send(KEY_EASE, 2);      }      else if(cell_index->row == 2) {        send(KEY_EASE, 3);      }       else if(cell_index->row == 3) {        send(KEY_EASE, 4);      }       break;   }   window_stack_pop(true);}
开发者ID:gitter-badger,项目名称:Ishi,代码行数:32,


示例6: inbox_received_callback

static void inbox_received_callback(DictionaryIterator *iterator, void *context){	Tuple *minutes = dict_find(iterator, VIBE_TIME);	if(minutes){		mins = minutes->value->uint8;		persist_write_int(KEY_MINUTES, mins);	}		Tuple *center_t = dict_find(iterator, CENTER);	if(center_t){		center = center_t->value->int8;		persist_write_bool(CENTER, center);				window_stack_pop(false);		deinit();		init();	}		Tuple *date = dict_find(iterator, SHOW_DATE);	if(date){		accel_tap_service_unsubscribe();		if(date->value->int8){			accel_tap_service_subscribe(accel_tap_handler);		}	}	}
开发者ID:nmittu,项目名称:Nixie-Watch,代码行数:26,


示例7: time_window_pop

static void time_window_pop() {  if(window_is_loaded(s_time_window)) {    window_stack_pop(true);    checktime = time(NULL);    update_count();  }}
开发者ID:kid-c-plus,项目名称:LifeTimer,代码行数:7,


示例8: out_sent_handler

void out_sent_handler(DictionaryIterator *sent, void *context){	// outgoing message was delivered	// go back to the home page and remove all the top layers	// successfull call means...nothing should happen, right?	// prescreen_deinit(); // this is a test	window_stack_pop(true);}
开发者ID:weianwang,项目名称:Alertr,代码行数:7,


示例9: select_click_callback

static void select_click_callback(MenuLayer *menu_layer, MenuIndex *cell_index, void *callback_context) {  APP_LOG(APP_LOG_LEVEL_DEBUG, "Got a click for row %d", cell_index->row);  if (hint_layer) {    text_layer_destroy(hint_layer);    hint_layer = NULL;  }  if (cell_index->row > 0) {    app_timer_reschedule(locationtimer, 1000 * (nextcall + 10));    if (cell_index->row == 1) {      strcpy(command, "set");    text_layer_set_text(distance_layer, "0");    } else      snprintf(command, sizeof(command), "set%d", (cell_index->row)-2);    DictionaryIterator *iter;    app_message_outbox_begin(&iter);    if (iter == NULL) {      vibes_short_pulse();      APP_LOG(APP_LOG_LEVEL_WARNING, "Can not send command %s to phone!", command);      return;    }    dict_write_cstring(iter, CMD_KEY, command);    const uint32_t final_size = dict_write_end(iter);    app_message_outbox_send();    APP_LOG(APP_LOG_LEVEL_DEBUG, "Sent command '%s' to phone! (%d bytes)", command, (int) final_size);  }  window_stack_pop(animated);}
开发者ID:edmund-k,项目名称:pebble-geocachingpro-back,代码行数:27,


示例10: select_long_click_handler

static void select_long_click_handler(ClickRecognizerRef recognizer, void* context) {    if (common_long(MID)) return;    //    blackout = !blackout;  //  //    if (blackout)  //    text_layer_set_background_color(text_layer, GColorBlack);  //    else  //    text_layer_set_background_color(text_layer, GColorClear);    // clear the string  /*pos = 0;  for (int i=0; i<TEXT_LENGTH; i++)  text_buffer[i] = ' ';    drawNotepadText();  change_set(cur_set, false);    next();  drawSides();*/  strncpy(return_text,text_buffer,DESCRIPTION_LENGTH);  window_stack_pop(true);  }
开发者ID:clach04,项目名称:alarmsplusplus,代码行数:25,


示例11: settings_select_single_click_handler

void settings_select_single_click_handler(ClickRecognizerRef recognizer, void *context) {	// For Select Feature - Set Settings & return to main Window	persist_write_int(0, units);	send_cmd();	window_stack_pop(true);	window_stack_push(window, true);}
开发者ID:aclymer,项目名称:skireport_V0_55,代码行数:7,


示例12: statuswindow_timeout

void statuswindow_timeout(void *callback_data) {        app_timer_cancel(statuswindow_timer);    statuswindow_timer = NULL;    window_stack_pop(true);    }
开发者ID:dkkrause,项目名称:pebble-dev,代码行数:7,


示例13: inbox_received_callback

static void inbox_received_callback(DictionaryIterator *iterator, void *context) {	  // Read first item  Tuple *t = dict_read_first(iterator);  text_layer_set_text( title_layer, title );	  // For all items  while(t != NULL) {    // Which key was received?		APP_LOG(APP_LOG_LEVEL_DEBUG, "Loop index now %s", t->value->cstring);    switch(t->key) {    case KEY_ABSTRACT:          snprintf(abstract, sizeof(abstract), "%s", t->value->cstring);			      break;    case KEY_TITLE:          snprintf(title, sizeof(title), "%s", t->value->cstring);      break;    default:      snprintf( title, sizeof(abstract), "%s", t->value->cstring );      break;    }		text_layer_set_text( word_layer, abstract );// Look for next item    app_timer_register( (200+10*( strlen(abstract) )), (AppTimerCallback) refresh, NULL);    		psleep(500);    t = dict_read_next(iterator);  }  window_stack_pop(true);  }
开发者ID:kyleliangus,项目名称:KeySpeedRead,代码行数:30,


示例14: back_click_handler

static void back_click_handler(ClickRecognizerRef recognizer, void *context) {  if (s_state == BEGINNING_STATE) {    window_stack_pop(true);  } else if (s_state == CHECKING_CONTACT_STATE && has_contact) {    // contact_try++;    // get_contact();    // has_contact = false;  } else if (s_state == CREATING_FINAL_MESSAGE_STATE) {    reset_all();    snprintf(instruction_text, sizeof(instruction_text), "%s", "Choose recipient");    text_layer_set_text(s_instruction_layer, instruction_text);    primary_text[0] = '/0';    text_layer_set_text(s_primary_layer, primary_text);  } else if (s_state == CONFIRMING_FINAL_MESSAGE_STATE) {    change_state(CREATING_FINAL_MESSAGE_STATE);    dictated_message[0] = '/0';    snprintf(instruction_text, sizeof(instruction_text), "%s", "Create message");    snprintf(primary_text, sizeof(primary_text), "%s", contact_name);    text_layer_set_text(s_instruction_layer, instruction_text);    text_layer_set_text(s_primary_layer, primary_text);    // dictated_message[0] = '/0';    // snprintf(primary_text, sizeof(primary_text), "%s", dictated_message);    // text_layer_set_text(s_primary_layer, primary_text);    // change_state(CREATING_FINAL_MESSAGE_STATE);  }}
开发者ID:runnersaw,项目名称:pebble-text,代码行数:30,


示例15: select_single_click_handler

static void select_single_click_handler(ClickRecognizerRef recognizer, void* context){    if (actions_menu_is_displayed())    {        int16_t pickedItem = actions_menu_get_selected_index();        if (pickedItem == 0)        {            nw_send_reply_text(text_buffer);            actions_menu_hide();            window_stack_pop(true);        }        else        {            char* copySource = actions_menu_get_action_text(pickedItem);            int sourceLength = strlen(copySource);            if (sourceLength + pos < MAX_CHARS)            {                strcpy(&text_buffer[pos], copySource);                pos += sourceLength;                drawNotepadText();                actions_menu_hide();            }        }        return;    }    clickButton(MID);}
开发者ID:rchampeaux,项目名称:PebbleNotificationCenter-Watchapp,代码行数:30,


示例16: back_single_click_handler

static void back_single_click_handler(ClickRecognizerRef recognizer, void* context) {    if (actions_menu_is_displayed())        actions_menu_hide();    else        window_stack_pop(true);}
开发者ID:rchampeaux,项目名称:PebbleNotificationCenter-Watchapp,代码行数:7,


示例17: nw_remove_notification

void nw_remove_notification(uint8_t id, bool closeAutomatically){    if (numOfNotifications <= 1 && closeAutomatically)    {        tertiary_text_window_close();        window_stack_pop(true);        return;    }    remove_notification_from_storage(id);    bool differentNotification = pickedNotification == id;    if (pickedNotification >= id && pickedNotification > 0)    {        pickedNotification--;    }    if (differentNotification)    {        actions_menu_hide();        tertiary_text_window_close();        nw_switch_to_notification(pickedNotification);    }}
开发者ID:rchampeaux,项目名称:PebbleNotificationCenter-Watchapp,代码行数:25,


示例18: back_click_handler

/** * Handles the Back Button Presses */static void back_click_handler(ClickRecognizerRef recognizer, void *context) {	status.end = true;	//free(status.timer);	status.timer = NULL;		window_stack_pop(true);}
开发者ID:YagoCarballo,项目名称:the_stacker,代码行数:10,


示例19: prv_goal_reached_wait_timer_handler

static void prv_goal_reached_wait_timer_handler(void *context) {  GoalStarGoalEventWindowData *data = context;  if (data) {    data->goal_reached_sequence_timer = NULL;  }  window_stack_pop(true /* animated */);}
开发者ID:aizad02,项目名称:goal_star,代码行数:7,


示例20: second_tick

static void second_tick(void){    elapsedTime++;    if (appIdle && config_timeout > 0 && config_timeout < elapsedTime && main_noMenu)    {        window_stack_pop(true);        return;    }    if (lightOn && elapsedTime >= config_lightTimeout)    {        lightOn = false;        light_enable(false);    }    if (periodicVibrationPeriod > 0 &&        appIdle &&        elapsedTime > 0 && elapsedTime % periodicVibrationPeriod == 0 &&        !nw_get_displayed_notification()->inList &&        canVibrate() &&        (config_periodicTimeout == 0 || elapsedTime < config_periodicTimeout))    {        VibePattern pat = {                .durations = config_periodicVibrationPattern,                .num_segments = config_periodicVibrationPatternSize / 2,        };        nw_vibrate(&pat, config_periodicVibrationTotalDuration);    }    nw_ui_update_statusbar_clock();}
开发者ID:rchampeaux,项目名称:PebbleNotificationCenter-Watchapp,代码行数:33,


示例21: select_menu_callback

 // Menu callback void select_menu_callback(int index, void *context) {	app_message_outbox_begin(&iter);	static char* select_action;	if  (strcmp(menu_action, "c") == 0) {		select_action = "selClient";	} else if(strcmp(menu_action, "t") == 0) {		select_action = "selTask";		snprintf(task_title, 40, "Task:/n%s", list_menu_items[index].title);		text_layer_set_text(task_layer, task_title);	} else if (strcmp(menu_action, "p") == 0) {		select_action = "selProj";		snprintf(project_title, 40, "Project:/n%s", list_menu_items[index].title);		text_layer_set_text(task_layer, project_title);	} else {		// strcmp failed to find a match		APP_LOG(APP_LOG_LEVEL_DEBUG, "No match on strcmp, value of menu_action follows");		APP_LOG(APP_LOG_LEVEL_DEBUG, menu_action);	}	Tuplet action_type = TupletCString(0, select_action);	dict_write_tuplet(iter, &action_type);	Tuplet selected = TupletInteger(1, index);	dict_write_tuplet(iter, &selected);	app_message_outbox_send(); // this send is causing crash :S	//pop the menu off	window_stack_pop(true); }
开发者ID:BillMyTime,项目名称:bill-my-time-pebble,代码行数:28,


示例22: game_logic

static void game_logic() {    // Per-frame game logic here    if(get_current_state() == STATE_SPLASH) {        psleep(MENUPSLEEPTIME); // Trying to save the battery!    } else if(get_current_state() == STATE_SHOWMAINMENU) {        main_menu_create();    } else if(get_current_state() == STATE_MARATHON) {        race_reset_cars();        race_set_difficulty(DIFFICULTY);        track_set_length(14000);        main_menu_destroy();        switch_on_light(50000);        set_current_state(STATE_BEFORERACE);    } else if(get_current_state() == STATE_SPRINT) {        race_reset_cars();        race_set_difficulty(DIFFICULTY);        track_set_length(7000);                main_menu_destroy();        switch_on_light(35000);        set_current_state(STATE_BEFORERACE);    } else if(get_current_state() == STATE_BEFORERACE) {        race_result_create_position_layers();        race_place_cars_on_grid();        race_set_start_time();        set_current_state(STATE_RACING);    } else if(get_current_state() == STATE_RACING) {        race_frame_update();    } else if(get_current_state() == STATE_AFTERRESULTS) {        psleep(MENUPSLEEPTIME); // Trying to save the battery!    } else if(get_current_state() == STATE_QUITTING) {        APP_LOG(APP_LOG_LEVEL_DEBUG, "!!!   QUITTING from horizontalboost !!!!");                window_stack_pop(false);     }}
开发者ID:evening2005,项目名称:horizontalboost03,代码行数:34,


示例23: show_message

void show_message(char message[]){	window_stack_pop(true);	window_stack_push(message_window, true);	set_message(message);	last_screen = current_screen;	current_screen = SCREEN_MESSAGE_KEY;}
开发者ID:CodeWithASmile,项目名称:BoatRemote,代码行数:7,


示例24: simply_window_stack_pop

void simply_window_stack_pop(SimplyWindowStack *self, SimplyWindow *window) {  self->is_hiding = true;  if (window->window == window_stack_get_top_window()) {    bool animated = true;    window_stack_pop(animated);  }  self->is_hiding = false;}
开发者ID:Gagnon06,项目名称:pebblejs,代码行数:8,


示例25: out_failed_handler

void out_failed_handler(DictionaryIterator *failed, AppMessageResult reason, void *context){	// outgoing message failed	// do nothing for now	// display some kind of error message that can only be dismissed by pressing a button	// then go back to the home page 	// stack.pop, stack.pop	window_stack_pop(true);}
开发者ID:weianwang,项目名称:Alertr,代码行数:8,


示例26: select_callback

static void select_callback(int index, void *context) {		int * pointerToValue = (int*) context;	if(* pointerToValue == 0){		send_to_phone( TupletInteger(101, index)); //index maps to courseIdx!		vibes_short_pulse();		window_stack_pop(true); //close this window (course menu)	}}
开发者ID:StarTraX,项目名称:tactician,代码行数:8,


示例27: show_error

// Show windowvoid show_error(char *error_title, char *error_desc) {  window_stack_pop(false);  initialise_ui();  text_layer_set_text(error_title_text_layer, error_title);  text_layer_set_text(error_description_text_layer, error_desc);  window_set_window_handlers(s_window, (WindowHandlers) {    .unload = handle_window_unload,  });
开发者ID:sjmatta,项目名称:disney-world-for-pebble,代码行数:9,


示例28: resort_unload

static void resort_unload(Window *resort) {	text_layer_destroy(resort_top_text_layer);	text_layer_destroy(resort_center_text_layer);	text_layer_destroy(resort_bottom_text_layer);	action_bar_layer_destroy(resort_action_bar);	gbitmap_destroy(right_arrow_icon);	window_stack_pop(true);}
开发者ID:aclymer,项目名称:skireport_V0_55,代码行数:8,


示例29: sms_select_callback

void sms_select_callback(int index, void *context){  for(int i=0;i<3;i++){    window_stack_pop(false);  }    //window_stack_pop_all(false);}
开发者ID:danielmiyamoto,项目名称:phonelink-watch,代码行数:8,


示例30: out_sent_handler

void out_sent_handler(DictionaryIterator *sent, void *context) {  // outgoing message was delivered    // When the application returns an ACK of OK,  // Pop the window and exit the applicaiton.  window_stack_pop(true);  }
开发者ID:BlackAngus,项目名称:moodtracker-pebbleapp,代码行数:8,



注:本文中的window_stack_pop函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ window_stack_push函数代码示例
C++ window_single_click_subscribe函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。