Essentially, the strategy is to create a bunch of widgets with callbacks, then enter a main event loop.
本质上,这个策略是创建带回调的一串窗口小部件,然后进入一个主事件循环。
Listing 5 shows the remainder of the main logic loop.
清单5显示了主逻辑循环的其余部分。
Listing 3 shows the remainder of the main logic loop.
清单3显示了主逻辑循环的其余部分。
To switch between modes, an additional check is required in each pass of the main program loop.
要在模式间进行切换,需要对主程序循环的每次循环执行额外的检查。
Listing 2 shows the beginning of the main processing loop.
清单2显示了主处理循环的开头。
In this model, called Pipelining, the main thread is used to loop through the results as they are produced by the other threads.
在这个被称为“并行管道”的模型下,主线程将会在另一个线程产出结果的同时进行循环处理。
In the next section, if the cluster and shapefile node that has just been printed is the home node, exit the main loop without writing edge or linkage information.
在第二部分中,如果刚刚打印出来的聚类和shapefile节点是主节点,那么退出主循环并且不要编写边或链接信息。
You could program the main loop more elegantly by using fputcsv(), which handles formatting problems (see Listing 3).
您可以使用fputcsv()更便捷地对主循环编程,fputcsv() 能够帮助处理格式化问题(参见清单3)。
Earlier in the article I rewrote the main conversion function in c, and now I am going to rewrite the main loop in c. the new code is fairly straightforward (enter as convert_driver_c.c).
在本文开头我使用c语言重新编写了主转换函数,现在将使用c语言重新编写主循环。
The main loop enters an indefinite loop, waiting for events and calling callbacks, until someone calls gtk_main_quit() by closing the window.
主循环进入无限循环,等候事件并调用回调,直到有人关闭窗口,调用 gtk_main_quit() 为止。
The main loop runs until gtk_main_quit is called when the user closes the window.
主循环一直运行,直到用户关闭窗口,调用gtk_main _ quit时才结束。
Listing 10 shows the continuation of the main processing loop after the cnee events are read.
清单10展示了读取cnee事件后主处理循环的后面部分。
The window is displayed on the screen, and the application activates the main loop by calling gtk_main .
在屏幕上显示窗口,应用程序调用gtk_main,激活主循环。
By doing so, the loop in the main scope and logic in the event handler controls the final number of event handler instances.
这样,主范围内的循环和事件处理程序中的逻辑就可以控制事件处理程序的最终数目。
Then, each pass of the main loop checks for events, resets the draw state, draws the circular "portal" windows, then animates their distortion back to the current time frame.
随后,主循环在每次循环时都检查事件、重置绘图状态、绘出圆形的“门户”窗口,然后以动画形式将其失真返回当前时帧。
The main loop then looks through its internal mapping table between its signals and handlers, also called callbacks, and calls the handlers registered for the given signal on the given object.
然后主循环查询自己的信号和处理程序之间的内部映射表,也叫做回调,并调用注册到指定对象的指定信号的处理程序。
With the base variable declarations and subroutine complete, the program moves on to the main program loop, shown below.
完成了基本变量声明和子例程后,程序将继续进行主程序循环,如下所示。
Create a hash keyed on E-mail address for each state name, to be checked in the main program loop.
创建与每个州名的电子邮件地址绑定的散列,将在主程序循环中检查该散列。
The main loop operates on a continuous check-dispatch-sleep cycle.
主循环在连续的检查-分配-睡眠周期上操作。
When an event occurs, the object associated with that event emits a signal to inform the main loop that it has occurred.
当事件发生时,与这个事件对应的对象发出信号,通知主循环事件已经发生。
Listing 4 shows the beginning of the three-finger detection in the main program loop.
清单4显示了主程序循环中的三指检测的开始部分。
Stan Murch, in a uniform-like blue jacket, stood on the sidewalk in front of the Hilton and watched cab after cab make the loop in to the main entrance.
斯坦默奇穿着酷似制服的兰色夹克,站在希尔顿饭店前面的人行道上,看着出租车一辆接着一辆拐入大门口前。
In the main program loop, there is no need for the code that ignores the header lines and the first two lines of input.
在主程序循环中,代码无需忽略标题行和输入的前两行。
You create the necessary network listening sockets, register the events to be called during execution, and then start the main event loop with the libev handling the rest of the process.
创建所需的网络监听套接字,注册在执行期间要调用的事件,然后启动主事件循环,让libev处理过程的其余部分。
After the module includes and the initial variable declarations, the main control loop is entered.
在模块include语句和初始变量声明之后,进入主控制循环。
Listing 3 starts the main program loop and reads the synclient output.
清单3将启动主程序循环并读取synclient输出。
That's why the main test method in Listing 1 USES a while loop instead of a new for loop.
这就是为什么清单1中的main测试方法使用while循环而不是一个新的for循环。
The main foreach loop cycles through each of the nodes within the parent filesystem element.
主foreach循环对父filesystem元素中的每个节点进行循环。
The main function creates a Glib event loop, gets a connection to the session bus, and integrates the D-BUS event handling into the Glib event loop.
main函数创建一个Glib事件循环,获得会话总线的一个连接,并将D -BUS事件处理集成到Glib事件循环之中。
Lines starting with the comment "end main loop".
以注释“endmain loop”开始的行。
应用推荐