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.
要在模式间进行切换,需要对主程序循环的每次循环执行额外的检查。
Here I set the widgets to be visible, and start the GTK + main event loop.
这里,我将窗口小部件设置为可视的,然后启动GTK +主事件循环。
Create a hash keyed on E-mail address for each state name, to be checked in the main program loop.
创建与每个州名的电子邮件地址绑定的散列,将在主程序循环中检查该散列。
Listing 2 shows the beginning of the main processing loop.
清单2显示了主处理循环的开头。
Listing 2 shows the beginning of the main program 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.
在这个被称为“并行管道”的模型下,主线程将会在另一个线程产出结果的同时进行循环处理。
The main loop is entered to read every line on STDIN and extract relevant information.
进入主循环以读取STDIN 中的每一行并提取相关信息。
Line 32 USES the "XSL: for-each" element to define the loop that creates the main part of the table, generating one line for each "emp" element occurrence.
第32行使用“xsl:for - each”元素来定义创建表的主要部分的循环,用以为每个出现的“emp”元素生成一行。
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节点是主节点,那么退出主循环并且不要编写边或链接信息。
In the main loop, you turn the LED on with the line.
在主要循环中,利用下面这行代码打开LED。
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语言重新编写主循环。
Listing 4 is the main loop that produces each entry in the Atom feed.
清单4所示的循环用来生成这个Atom提要内的每个条目。
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时才结束。
When everything is set up and visible, the gtk_main() function activates the main loop.
当诸事就位,而且显示出来之后,gtk_main()函数就激活主循环。
Listing 10 shows the continuation of the main processing loop after the cnee events are read.
清单10展示了读取cnee事件后主处理循环的后面部分。
The PortletNavigation.jsp is included either above or below the main navigation loop.
jsp包含在主导航循环的上方或下方。
It calls the gtk_main_quit routine that quits the main loop.
它调用gtk_main _ quit例程以退出主循环。
The window is displayed on the screen, and the application activates the main loop by calling gtk_main .
在屏幕上显示窗口,应用程序调用gtk_main,激活主循环。
Unless it finds one or the other, it triggers a message in the main loop.
除非它找到一个查询或定义,否则它会都在主循环中触发消息。
However, in the main loop, you have a conditional branch.
然而,在主循环中,您使用了一个条件分支。
现在,我们来运行主循环。
Listing 9 shows the beginning of the main program loop.
清单9展示了主程序循环的开始部分。
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.
然后主循环查询自己的信号和处理程序之间的内部映射表,也叫做回调,并调用注册到指定对象的指定信号的处理程序。
应用推荐