📄 next_slide.1
字号:
.\" Copyright (c) 1990 Entropic Research Laboratory, Inc..\" @(#)next_slide.1 1.1 11/8/90 ERL.TH NEXT_SLIDE 1 90/09/25.ds ]W "\fI\s+4\ze\h'0.05'e\s-4\v'-0.4m'\fP\(*p\v'0.4m'\ Entropic Research Laboratory, Inc..SH "NAME"next_slide \- cause \fIxloadimage\fP to advance to the next slide..SH "SYNOPSIS".B next_slide[.I wait].SH "DESCRIPTION".PP.I next_slideis used with a modified version of the.I xloadimageprogram to control advancing from one image to the next in aprogram-controlled slideshow.The programs are used in a shell script as follows..nf.IPnext_slide 0xloadimage \-prog_slideshow file_1 ... file_n &\&... <commands> ...next_slide\&... <more commands> ...next_slide\&... <etc.> ....fi.LPThe reason for the initial.I next_slide 0is explained further down.The.I xloadimageline starts the program as a background process and with the imagesto be displayed as arguments;.I xloadimagedisplays a blank frame, and the first group of commands following the.I xloadimageline is executed.The first.I next_slidecommand.I afterthe invocation of.I xloadimagecauses.I xloadimageto begin processing the first image,which replaces the blank frame on the screen.The second group of commands, indicated by.I <more commands>,begins execution while the first image is being processed.The second next_slide command causes.I xloadimageto begin processing the second image.Execution of the shell script continues in this way, with invocations of.I next_slidealternating with other commands.The number of.I next_slidecommands after the.I xloadimageline.RI ( i.e.not counting the initial.IR "next_slide 0" )should be one more than the number of image files to be displayed.The last.I next_slidecauses the last image to be taken down, and.I xloadimageterminates..PPThe two programs communicate with a semaphorethat has four states: "Busy", "Ready", "Pause", and "Quit".(For those who care about the details, this is implementedas a property named "XLOADIM_READY" that is set on the root window.See section 10.1 of the.I Xlib Programming Manualfor more information.)The value is normally supposed to be "Busy" when.I xloadimageis not running or is processing an input file in preparation for displaying it.The value is normally supposed to be "Ready" when a slide is on the screen and.I xloadimageis waiting for the command to begin processing the next image.To this end.I xloadimagesets the value to "Busy" during initialization and just before exiting;it sets the value to "Ready" just after sending an image to the screen.When.I next_slideruns, it waits, if necessary, for the value to become "Ready" and thenchanges the value to "Busy".When the value changes, the window system automatically notifies.I xloadimageof the change, and.I xloadimagebegins processing the next file, if any, or else exits..PP.I next_slidenormally does not wait indefinitely for the semaphore to become "Ready".After a maximum waiting time in the "Busy" state, 60 seconds by default,.I next_slideconcludes that.I xloadimageis not running and simply exits.However, if the semaphore state is "Pause",.I next_slidewill wait indefinitely, regardless of the maximum.Typing 'p' (for "pause") to.I xloadimagesets the semaphore to "Pause" and prevents a subsequent invocation of.I next_slidefrom causing an advance to the next image.Typing 'c' (for "continue") changes the semaphore to "Ready",and any waiting invocation of.I next_slidethen triggers the advance.A non-default value for the maximum waiting time can be specified in secondson the command line..PPTyping 'q' (for "quit") to.I xloadimagesets the semaphome to "Quit" and exits from.I xloadimage.If.I next_slidedetects the "Quit" state, it changes the semaphore to "Busy" and exits..PP.I next_slidereturns exit status 0 after setting the semaphore from "Ready to "Busy"to bring up the next image. It returns exit status 1 afterdetecting a "Quit", after timing out, and in case of various othererrors. Thus writing.nf.IPnext_slide || exit 1.fi.LPin the shell script in place of simply.nf.IPnext_slide.fi.LPwill cause an exit from the shell script at that point if "Quit" is detected..PPAs a special case, a command-line argument of 0 causes.I next_slideto set the semaphore to "Busy" and return exit status 0 immediately,without a timeout message.The reason for putting.I next_slide 0in the shell script before the invocation of.I xloadimageis to guard against confusion that is possible when an earlier run of.I xloadimagehas been terminated abnormally or with a typed 'q',leaving the semaphore in a state other than "Busy" with.I xloadimagenot running..SH "FUTURE CHANGES".PP.SH "SEE ALSO".PPxloadimage(1).SH "BUGS".PPAfter.I next_slideruns, there is a processing delay of several seconds before the nextimage actually becomes visible. During that period, a 'p' typed to.I xloadimagewill cause the image being processed to remain visible once it comes up;it will not affect the image that is actually visible at the time.Similarly, a 'q' typed to.I xloadimageduring a processing period does not take effect until the processingis complete..SH "REFERENCES".PPA. Nye,.I "Xlib Programming Manual for Version 11 of the X Window System,"O'Reilly & Associates, Sebastopol, Calif., 1990..SH "AUTHOR".PPRod Johnson, Entropic Research Laboratory, Inc..SH "COPYRIGHT"Copyright (c) 1990 Entropic Research Laboratory, Inc..PPThe.I next_slideprogram is copyrighted material covered by a copyright and disclaimerof liability similar to that used by the MIT X Consortium. Briefly,unlimited free use, copying, and distribution are allowed providedthat the copyright notice and disclaimer are left intact. Seethe source files for complete information. The.I next_slideprogram is free software; it is \fInot\fP a part of ESPS or the.I waves+software package, and fees paid to ERL as part of ESPS or.I waves+license agreements do \fInot\fP include any payments for.I next_slide.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -