|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<!-- EN-Revision: 23ea6be076881a34e1d454e9680968ece085f7f6 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandowobeto, leonardolara --> |
3 | | -<chapter xml:id="event.callbacks" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 2 | +<!-- EN-Revision: a47dff201e3f65c07f6c84a535951632771cf72d Maintainer: leonardolara Status: ready --> |
| 3 | +<!-- CREDITS: fernandowobeto, leonardolara --> |
| 4 | +<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="event.callbacks"> |
4 | 5 | <title>Funções de retorno de eventos</title> |
5 | 6 | <para> |
6 | 7 | Se uma função de retorno for registrada para um evento, ela será chamada quando o evento |
|
19 | 20 | <methodsynopsis> |
20 | 21 | <type>void</type> |
21 | 22 | <methodname>callback</methodname> |
22 | | - <methodparam |
23 | | - choice="opt"> |
| 23 | + <methodparam choice="opt"> |
24 | 24 | <type>mixed</type> |
25 | 25 | <parameter>fd</parameter> |
26 | 26 | <initializer>&null;</initializer> |
27 | 27 | </methodparam> |
28 | | - <methodparam |
29 | | - choice="opt"> |
| 28 | + <methodparam choice="opt"> |
30 | 29 | <type>int</type> |
31 | 30 | <parameter>what</parameter> |
32 | 31 | </methodparam> |
33 | | - <methodparam |
34 | | - choice="opt"> |
| 32 | + <methodparam choice="opt"> |
35 | 33 | <type>mixed</type> |
36 | 34 | <parameter>arg</parameter> |
37 | 35 | <initializer>&null;</initializer> |
38 | 36 | </methodparam> |
39 | 37 | </methodsynopsis> |
40 | | - <para> |
41 | | - <variablelist> |
42 | | - <varlistentry> |
43 | | - <term> |
| 38 | + <variablelist> |
| 39 | + <varlistentry> |
| 40 | + <term> |
| 41 | + <parameter>fd</parameter> |
| 42 | + </term> |
| 43 | + <listitem> |
| 44 | + <para> |
| 45 | + O descritor de arquivo, recurso de fluxo ou soquete associado ao |
| 46 | + evento. Para o evento de sinal |
44 | 47 | <parameter>fd</parameter> |
45 | | - </term> |
46 | | - <listitem> |
47 | | - <para> |
48 | | - O descritor de arquivo, recurso de fluxo ou soquete associado ao |
49 | | - evento. Para o evento de sinal |
50 | | - <parameter>fd</parameter> |
51 | | - é igual ao número do sinal. |
52 | | - </para> |
53 | | - </listitem> |
54 | | - </varlistentry> |
55 | | - <varlistentry> |
56 | | - <term> |
57 | | - <parameter>what</parameter> |
58 | | - </term> |
59 | | - <listitem> |
60 | | - <para> |
61 | | - Máscara de bits de |
62 | | - <emphasis>todos</emphasis> |
63 | | - eventos acionados. |
64 | | - </para> |
65 | | - </listitem> |
66 | | - </varlistentry> |
67 | | - <varlistentry> |
68 | | - <term> |
69 | | - <parameter>arg</parameter> |
70 | | - </term> |
71 | | - <listitem> |
72 | | - <para> |
73 | | - Dados personalizados do usuário. |
74 | | - </para> |
75 | | - </listitem> |
76 | | - </varlistentry> |
77 | | - </variablelist> |
78 | | - </para> |
| 48 | + é igual ao número do sinal. |
| 49 | + </para> |
| 50 | + </listitem> |
| 51 | + </varlistentry> |
| 52 | + <varlistentry> |
| 53 | + <term> |
| 54 | + <parameter>what</parameter> |
| 55 | + </term> |
| 56 | + <listitem> |
| 57 | + <para> |
| 58 | + Máscara de bits de |
| 59 | + <emphasis>todos</emphasis> |
| 60 | + eventos acionados. |
| 61 | + </para> |
| 62 | + </listitem> |
| 63 | + </varlistentry> |
| 64 | + <varlistentry> |
| 65 | + <term> |
| 66 | + <parameter>arg</parameter> |
| 67 | + </term> |
| 68 | + <listitem> |
| 69 | + <para> |
| 70 | + Dados personalizados do usuário. |
| 71 | + </para> |
| 72 | + </listitem> |
| 73 | + </varlistentry> |
| 74 | + </variablelist> |
79 | 75 | <para> |
80 | 76 | <methodname>Event::timer</methodname> |
81 | 77 | espera que a função de retorno corresponda ao seguinte protótipo: |
82 | 78 | </para> |
83 | 79 | <methodsynopsis> |
84 | 80 | <type>void</type> |
85 | 81 | <methodname>callback</methodname> |
86 | | - <methodparam |
87 | | - choice="opt"> |
| 82 | + <methodparam choice="opt"> |
88 | 83 | <type>mixed</type> |
89 | 84 | <parameter>arg</parameter> |
90 | 85 | <initializer>&null;</initializer> |
91 | 86 | </methodparam> |
92 | 87 | </methodsynopsis> |
93 | | - <para> |
94 | | - <variablelist> |
95 | | - <varlistentry> |
96 | | - <term> |
97 | | - <parameter>arg</parameter> |
98 | | - </term> |
99 | | - <listitem> |
100 | | - <para> |
101 | | - Dados personalizados do usuário. |
102 | | - </para> |
103 | | - </listitem> |
104 | | - </varlistentry> |
105 | | - </variablelist> |
106 | | - </para> |
| 88 | + <variablelist> |
| 89 | + <varlistentry> |
| 90 | + <term> |
| 91 | + <parameter>arg</parameter> |
| 92 | + </term> |
| 93 | + <listitem> |
| 94 | + <para> |
| 95 | + Dados personalizados do usuário. |
| 96 | + </para> |
| 97 | + </listitem> |
| 98 | + </varlistentry> |
| 99 | + </variablelist> |
107 | 100 | <para> |
108 | 101 | <methodname>Event::signal</methodname> |
109 | 102 | espera que a função de retorno corresponda ao seguinte protótipo: |
110 | 103 | </para> |
111 | 104 | <methodsynopsis> |
112 | 105 | <type>void</type> |
113 | 106 | <methodname>callback</methodname> |
114 | | - <methodparam |
115 | | - choice="opt"> |
| 107 | + <methodparam choice="opt"> |
116 | 108 | <type>int</type> |
117 | 109 | <parameter>signum</parameter> |
118 | 110 | </methodparam> |
119 | | - <methodparam |
120 | | - choice="opt"> |
| 111 | + <methodparam choice="opt"> |
121 | 112 | <type>mixed</type> |
122 | 113 | <parameter>arg</parameter> |
123 | 114 | <initializer>&null;</initializer> |
124 | 115 | </methodparam> |
125 | 116 | </methodsynopsis> |
126 | | - <para> |
127 | | - <variablelist> |
128 | | - <varlistentry> |
129 | | - <term> |
130 | | - <parameter>signum</parameter> |
131 | | - </term> |
132 | | - <listitem> |
133 | | - <para> |
134 | | - O número do sinal disparado |
135 | | - (por ex. |
136 | | - <constant>SIGTERM</constant>). |
137 | | - </para> |
138 | | - </listitem> |
139 | | - </varlistentry> |
140 | | - <varlistentry> |
141 | | - <term> |
142 | | - <parameter>arg</parameter> |
143 | | - </term> |
144 | | - <listitem> |
145 | | - <para> |
146 | | - Dados personalizados do usuário. |
147 | | - </para> |
148 | | - </listitem> |
149 | | - </varlistentry> |
150 | | - </variablelist> |
151 | | - </para> |
| 117 | + <variablelist> |
| 118 | + <varlistentry> |
| 119 | + <term> |
| 120 | + <parameter>signum</parameter> |
| 121 | + </term> |
| 122 | + <listitem> |
| 123 | + <para> |
| 124 | + O número do sinal disparado |
| 125 | + (por ex. |
| 126 | + <constant>SIGTERM</constant>). |
| 127 | + </para> |
| 128 | + </listitem> |
| 129 | + </varlistentry> |
| 130 | + <varlistentry> |
| 131 | + <term> |
| 132 | + <parameter>arg</parameter> |
| 133 | + </term> |
| 134 | + <listitem> |
| 135 | + <para> |
| 136 | + Dados personalizados do usuário. |
| 137 | + </para> |
| 138 | + </listitem> |
| 139 | + </varlistentry> |
| 140 | + </variablelist> |
152 | 141 | </chapter> |
153 | 142 | <!-- Keep this comment at the end of the file |
154 | 143 | Local variables: |
|
0 commit comments