⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtk-server.1.html

📁 gtk_server的源代码
💻 HTML
📖 第 1 页 / 共 2 页
字号:
By default the widget ID is returned when a signal is received. If &lt;argument&gt; is 0,the command will return to the client program immediately, and the client programhas to perform a GTK iteration by itself. If there was no signal, the returnvalue willbe 0. If &lt;argument&gt; is 1, the command also willupdate all GTK widgets, but *only* return to the client script if a signal has occured. This setting willbe appropriate in most situations. Instead of '1' also the terms 'wait' or 'WAIT'may be used. Finally, if &lt;argument&gt; is 2, the command will update all pending GTK-events andreturn immediately with the last known signal. If there was no signal, thereturnvalue will be 0. Instead of 2 also the terms 'update' or 'UPDATE' may be used.<DT><B>gtk_server_callback_value &lt;argument&gt; &lt;type&gt;</B><DD>If values need to be retrieved from a callback function, it can be performed withthis function. For example: the &quot;select-row&quot; signal for the CList widget in GTK1 will pass the row numberand column number to the callback function. These occur as the 1st and 2nd argument of thesignal. (Argument 0 passes the widget ID.) To retrieve the clicked column number of a CList widget,perform the call 'gtk_server_callback_value 2 INT' in the client program, just after a signalon this widget has occurend. This will retrieve the column. The first argument may range from 0 to 7.The second argument 'type' may be INT or STRING to specify the type.This function is not available when the GTK-server has been compiled for the XForms backend.<DT><B>gtk_server_connect &lt;widgetID&gt; &lt;signal&gt; &lt;description&gt; [flag]</B><DD>This command adds an extra callback signal to a widget. The first argument refers tothe widget ID, which is returned when creating the widget. The second argument is thesignal name as used in GTK programming, e.g. &quot;clicked&quot;, &quot;enter&quot;, &quot;pressed&quot; and so on.The third argument is the string which will be returned by the GTK-server when thesignal has occured. The optional last argument will explain GTK to propagate the eventfurther. If [flag] is omitted or 0, the occured signal will only be handled by the clientprogram. Any value other than 0 will propagate the event to GTK also.<P>When the GTK-server has been compiled for XForms, the ID of the form must be provided as first argument,after which the event mask should be entered. The event mask can be one of KeyPressMask, KeyReleaseMask,ButtonPressMask, ButtonReleaseMask, EnterWindowMask, LeaveWindowMask, PointerMotionMask orButtonMotionMask. These are defined in the X-Server header files.<DT><B>gtk_server_connect_after &lt;widgetID&gt; &lt;signal&gt; &lt;description&gt; [flag]</B><DD>Similar to &quot;gtk_server_connect&quot;, but the signal occurs after other signals take place.This function is not available when the GTK-server has been compiled for the XForms backend.<DT><B>gtk_server_disconnect &lt;widgetID&gt; &lt;description&gt;</B><DD>Disconnects a signal from a widget which has been defined with &quot;gtk_server_connect&quot; or&quot;gtk_server_connect_after&quot; previously. The signals defined in the configfile can be disconnectedwhen the signalnames are used for description also. This function is not available when the GTK-server hasbeen compiled for the XForms backend.<DT><B>gtk_server_enable_c_string_escaping</B><DD>This command puts the GTK-server into C escaping mode. Returned strings are surrounded withdoublequotes, and by default the special characters BELL, CR, newline, TAB, doublequote and backslash will be preceded by the escape sign '\'. This allows debugging of strings without the clientprogram actually interpreting the special characters. To change the default set of characters,use 'gtk_server_set_c_string_escaping' (see below).<DT><B>gtk_server_disable_c_string_escaping</B><DD>Switches off the C escaping mode (default).<DT><B>gtk_server_set_c_string_escaping &lt;argument&gt;</B><DD>Defines the set of characters which should be escaped before they are returned by the GTK-server.<DT><B>gtk_server_mouse &lt;argument&gt;</B><DD>With this call the status of the mousepointer can be retrieved. When &lt;argument&gt; equals to 0,the x-coordinate of the mouse on the widget is returned. When &lt;argument&gt; equals to 1, the y-coordinate on the widget is returned. When &lt;argument&gt; equals to 2, the status ofthe mousebutton is returned, which is a value of 1 (left button), 2 (middle button), 3 (right button),4 or 5 (other buttons). It is required to connect the 'button-press-event' signal to the widget.<P>Finally, when &lt;argument&gt; equals to 3, the direction of the scrollbutton(s) on the mouse willbe returned: '0' means up, '1' down, '2' left and '3' means right. It is required to connectthe 'scroll-event' signal to the widget.<P>For XForms it is necessary to connect the 'ButtonPressMask' and 'PointerMotion' mask to the form.The result is an X event type enumeration. So if the returnvalue is 256, the left mousebutton ispressed, if the returnvalue is 512, the middle mousebutton is pressed and with 1024 the right mousebuttonis pressed. Also modifier keys like CTRL, ALT, SHIFT etc. are notified. Here is a complete table ofreturnvalues:<P><BR>1 = SHIFT KEY<BR>2 = CAPS_LOCK or SHIFT_LOCK<BR>4 = CONTROL KEY<BR>8 = MODIFIER1 (determined by the configuration of X)<BR>16 = MODIFIER2 (determined by the configuration of X)<BR>32 = MODIFIER3 (determined by the configuration of X)<BR>64 = MODIFIER4 (determined by the configuration of X)<BR>128 = MODIFIER5 (determined by the configuration of X)<BR>256 = MOUSEBUTTON1 (left)<BR>512 = MOUSEBUTTON2 (middle)<BR>1024 = MOUSEBUTTON3 (right)<BR>2048 = MOUSEBUTTON4<BR>4096 = MOUSEBUTTON5<P><BR>The returned result also can contain a combination of the above values. E.g. the result260 means that both the &lt;CTRL&gt; key and the left mousebutton are pressed at the same time.<DT><B>gtk_server_define &lt;gtk function&gt; &lt;signal&gt; &lt;returnvalue&gt; &lt;amount&gt; &lt;arg1&gt; ... &lt;argn&gt;</B><DD>This call defines a new GTK function. If the GTK function is already available in the configfilethen it will be redefined automatically. The syntax to define a GTK function is similar to thesyntax used in the 'gtk-server.cfg' file. Please refer to the man page of 'gtk-server.cfg' for details.<DT><B>gtk_server_redefine &lt;gtk function&gt; &lt;signal&gt; &lt;returnvalue&gt; &lt;amount&gt; &lt;arg1&gt; ... &lt;argn&gt;</B><DD>This call redefines a GTK function which is mentioned in the 'gtk-server.cfg' file. If the GTKfunction is not available in the configfile then it will be defined as a new GTK function.The syntax to redefine a GTK function is similar to the syntax used in the 'gtk-server.cfg' file.Please refer to the man page of 'gtk-server.cfg' for details.<DT><B>gtk_server_require &lt;libraryname&gt;</B><DD>Checks if &lt;libraryname&gt; is available on the system or not. If &lt;libraryname&gt; is not available, this callwill return a &quot;0&quot;, else it will return a &quot;1&quot;. If &lt;libraryname&gt; is not mentioned in the configfile, this callwill try to open it during runtime of the clientscript.<DT><B>gtk_server_timeout &lt;milliseconds&gt; &lt;widget&gt; &lt;signal&gt;</B><DD>This call sets up a timeout in the idle loop of GTK. When waiting for an event with 'gtk_server_callback wait',each amount of configured milliseconds an event will be generated by GTK so the callback function returns withthe configured widgetID or string. Make sure to connect the signal in the GTK-server configfileor with 'gtk_server_connect'-call first, otherwise the signal will not be recognized. This functions returnsa unique handle to identify the timeout. The handle can be used to remove the timeout with 'gtk_server_timeout_remove'.This function is not available when the GTK-server has been compiled for the XForms backend.<DT><B>gtk_server_timeout_remove &lt;handle&gt;</B><DD>Remove a timeout which has been setup earlier. This function is not available when the GTK-server has been compiledfor the XForms backend.<DT><B>gtk_server_opaque</B><DD>Returns an undefined widget. This can be used in cases where GTK has no explicit call to create a widget of acertain type, for example with GtkIter or GdkColor. This function is not available when the GTK-server has been compiledfor the XForms backend.<DT><B>gtk_server_echo &lt;string1&gt; &lt;string2&gt;...&lt;stringn&gt;</B><DD>This is a debug function. It will return the string which is sent to the GTK-server. Convenient when inSTDIN mode, or when using the GTK-server from a programming language console. Also this functioncan be used to keep an IP connection open when running in TCP/UDP mode.<DT><B>gtk_server_exit</B><DD>Exits the GTK-server, freeing all allocated resources.<DT><B>gtk_server_pid</B><DD>Returns the current process ID of the GTK-server (Unix only).<DT><B>gtk_server_macro_var &lt;macro&gt; &lt;variablename&gt;</B><DD>Returns the value of a variable defined in a macro. The variablenames may vary from 'a' to 'z'. See also the 'gtk-server.cfg'manpage for more info on macros.<DT><B>gtk_server_macro_define &lt;macrodefinition&gt;</B><DD>Defines a macro. The definition should have the same format as in the configfile. The lines in a macro should be separated with anewline. See also the 'gtk-server.cfg' manpage for more info on macros.<DT><B>gtk_server_macro_redefine &lt;macrodefinition&gt;</B><DD>Redefines a macro. The definition should have the same format as in the configfile. See also the 'gtk-server.cfg' manpage for more info on macros.<DT><B>gtk_server_key</B><DD>Returns the value of the last key pressed. It is required to connect the 'key-press-event' to the widget first, otherwise the eventis not recognized by GTK. For example:<P><BR>gtk_server_connect &lt;widgetID&gt; &quot;key-press-event&quot; &quot;keypressed&quot;<P>For XForms it is necessary to connect at least the 'KeyPressMask' event mask to the form. XForms uses the standard event masks fromthe X header files. If the 'KeyPressMask' has a value of 1, it should be connected as follows:<P>gtk_server_connect &lt;formID&gt; 1<P></DL><A NAME="lbAJ">&nbsp;</A><H2>FILES</H2><I>gtk-server.cfg</I><DL COMPACT><DT><DD>The configuration file for the GTK-server.</DL><A NAME="lbAK">&nbsp;</A><H2>EXAMPLES</H2>Examples of scripts using the GTK-server can be found in the sourcepackage. Also consultthe latest demoscripts at <A HREF="http://www.gtk-server.org/.">http://www.gtk-server.org/.</A><A NAME="lbAL">&nbsp;</A><H2>LICENSE</H2>GPL License.<P>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.<P>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<P>You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.<A NAME="lbAM">&nbsp;</A><H2>BUGS</H2>Please report bugs to: bugs AT gtk-server DOT org</A><A NAME="lbAN">&nbsp;</A><H2>SEE ALSO</H2>stop-gtk-server(1), <A HREF="http://www.gtk-server.org/gtk-server.cfg.1.html">gtk-server.cfg</A>(1)<A NAME="lbAO">&nbsp;</A><H2>AUTHORS</H2>Orignal concept, design and implementation by Peter van Eerten, e-mail : peter AT gtk-server DOT org<P>Current version of the GTK-server was created with help of many others - see the CREDITS file inthe sourcepackage for credits.<P><HR><A NAME="index">&nbsp;</A><H2>Index</H2><DL><DT><A HREF="#lbAB">NAME</A><DD><DT><A HREF="#lbAC">SYNOPSIS </A><DD><DT><A HREF="#lbAD">DESCRIPTION</A><DD><DT><A HREF="#lbAE">ARGUMENTS</A><DD><DT><A HREF="#lbAF">OPTIONS</A><DD><DT><A HREF="#lbAG">SHEBANG</A><DD><DT><A HREF="#lbAH">SHARED OBJECT / DLL / MODULE</A><DD><DT><A HREF="#lbAI">INTERNAL COMMANDS</A><DD><DT><A HREF="#lbAJ">FILES</A><DD><DT><A HREF="#lbAK">EXAMPLES</A><DD><DT><A HREF="#lbAL">LICENSE</A><DD><DT><A HREF="#lbAM">BUGS</A><DD><DT><A HREF="#lbAN">SEE ALSO</A><DD><DT><A HREF="#lbAO">AUTHORS</A><DD></DL><HR>This document was created by<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,using the manual pages.<BR>Time: 20:26:55 GMT, January 02, 2009</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -