~ubuntu-branches/ubuntu/quantal/libbonobo/quantal-201207170711

« back to all changes in this revision

Viewing changes to doc/api/tmpl/bonobo-generic-factory.sgml

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-02-18 14:40:51 UTC
  • mto: (3.1.1 etch) (1.1.25 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20050218144051-fo4h9qh2gim8x3wt
Tags: upstream-2.8.1
ImportĀ upstreamĀ versionĀ 2.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    <programlisting>
21
21
BonoboGenericFactory *factory;
22
22
 
23
 
factory = bonobo_generic_factory_new_multi (
 
23
factory = bonobo_generic_factory_new (
24
24
        "OAFIID:GNOME_MyApp_myId",
25
25
        my_factory_function, NULL);
26
26
bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
61
61
</para>
62
62
 
63
63
<para>
64
 
The generic factory works in two modes, multi and plain,
65
 
it is recommended that the multi mode be used. Also, there
66
 
is a macro that can be used for simple components to remove
67
 
the burden of writing the main function and getting the
68
 
initialization correct, see #BONOBO_OAF_FACTORY_MULTI.
69
 
</para>
 
64
There is a macro that can be used for simple components to remove the
 
65
burden of writing the main function and getting the initialization
 
66
correct, see #BONOBO_ACTIVATION_FACTORY.  </para>
70
67
 
71
68
<!-- ##### SECTION See_Also ##### -->
72
69
<para>
73
70
 
74
71
</para>
75
72
 
76
 
<!-- ##### MACRO BONOBO_GENERIC_FACTORY_TYPE ##### -->
77
 
<para>
78
 
 
79
 
</para>
80
 
 
81
 
 
82
 
 
83
 
<!-- ##### STRUCT BonoboGenericFactoryPrivate ##### -->
84
 
<para>
85
 
 
86
 
</para>
87
 
 
88
 
 
89
 
<!-- ##### STRUCT BonoboGenericFactory ##### -->
90
 
<para>
91
 
 
92
 
</para>
93
 
 
94
 
@base: 
95
 
@priv: 
96
 
 
97
73
<!-- ##### USER_FUNCTION BonoboFactoryCallback ##### -->
98
74
<para>
99
 
 
100
 
</para>
101
 
 
102
 
@factory: 
103
 
@component_id: 
104
 
@closure: 
105
 
@Returns: 
106
 
 
107
 
 
108
 
<!-- ##### TYPEDEF BonoboGenericFactoryClass ##### -->
109
 
<para>
110
 
 
111
 
</para>
 
75
Type of function that is called when it's time for the factory to create a new instance.
 
76
</para>
 
77
 
 
78
@factory: the factory that invoked this callback
 
79
@component_id: OAFIID of the component that should be activated
 
80
@closure: user data
 
81
@Returns: the newly created #BonoboObject
112
82
 
113
83
 
114
84
<!-- ##### FUNCTION bonobo_generic_factory_new ##### -->
120
90
@factory_cb: 
121
91
@user_data: 
122
92
@Returns: 
123
 
<!-- # Unused Parameters # -->
124
 
@oaf_iid: 
125
 
@factory: 
126
 
@component_id: 
127
 
@data: 
128
 
@goad_id: 
129
93
 
130
94
 
131
95
<!-- ##### FUNCTION bonobo_generic_factory_new_closure ##### -->
145
109
 
146
110
@factory: 
147
111
@act_iid: 
148
 
@factory_cb: 
 
112
@factory_closure: 
149
113
@Returns: 
150
114
<!-- # Unused Parameters # -->
151
 
@oaf_iid: 
152
 
@c_factory: 
153
 
@corba_factory: 
154
 
@user_data: 
155
 
@component_id: 
156
 
@data: 
157
 
@goad_id: 
 
115
@factory_cb: 
158
116
 
159
117
 
160
118
<!-- ##### FUNCTION bonobo_generic_factory_construct_noreg ##### -->
164
122
 
165
123
@factory: 
166
124
@act_iid: 
 
125
@factory_closure: 
 
126
<!-- # Unused Parameters # -->
167
127
@factory_cb: 
168
128
 
169
129
 
178
138
@Returns: 
179
139
 
180
140
 
 
141
<!-- ##### FUNCTION bonobo_generic_factory_main_timeout ##### -->
 
142
<para>
 
143
 
 
144
</para>
 
145
 
 
146
@act_iid: 
 
147
@factory_cb: 
 
148
@user_data: 
 
149
@quit_timeout: 
 
150
@Returns: 
 
151
 
 
152
 
181
153
<!-- ##### MACRO BONOBO_FACTORY_INIT ##### -->
182
154
<para>
183
 
 
 
155
Macro that expands to the code need to initialize an exe factory.  Should be placed at the beginning of the main() function.
184
156
</para>
185
157
 
186
 
@descr: 
187
 
@version: 
188
 
@argcp: 
189
 
@argv: 
 
158
@descr: factory description string
 
159
@version: version string
 
160
@argcp: pointer to main()'s argc
 
161
@argv: main()'s argv
190
162
 
191
163
 
192
164
<!-- ##### MACRO BONOBO_OAF_FACTORY ##### -->
193
165
<para>
194
 
 
 
166
Deprecated; see BONOBO_ACTIVATION_FACTORY().
195
167
</para>
196
168
 
197
169
@oafiid: 
199
171
@version: 
200
172
@callback: 
201
173
@data: 
202
 
<!-- # Unused Parameters # -->
203
 
@fn: 
204
174
 
205
175
 
206
176
<!-- ##### MACRO BONOBO_OAF_FACTORY_MULTI ##### -->
207
177
<para>
208
 
 
 
178
Deprecated; see BONOBO_ACTIVATION_FACTORY().
209
179
</para>
210
180
 
211
181
@oafiid: 
213
183
@version: 
214
184
@callback: 
215
185
@data: 
216
 
<!-- # Unused Parameters # -->
217
 
@fn: 
218
186
 
219
187
 
220
188
<!-- ##### MACRO BONOBO_ACTIVATION_FACTORY ##### -->
221
 
<para>
222
 
 
223
 
</para>
224
 
 
225
 
@oafiid: 
226
 
@descr: 
227
 
@version: 
228
 
@callback: 
229
 
@data: 
 
189
 
 
190
<para>
 
191
    Macro that includes all boiler-plate code necessary to create an exe
 
192
    type factory, including a main() function and a generic factory.
 
193
</para>
 
194
 
 
195
@oafiid: The factory's OAFIID
 
196
@descr: Description of the factory
 
197
@version: Version string of the factory program
 
198
@callback: Function (#BonoboFactoryCallback) responsible for intantiating components
 
199
@data: Additional data to be passed to the callback
 
200
 
 
201
 
 
202
<!-- ##### MACRO BONOBO_ACTIVATION_FACTORY_TIMEOUT ##### -->
 
203
<para>
 
204
    Like BONOBO_ACTIVATION_FACTORY(), but has an extra @quit_timeout argument.
 
205
</para>
 
206
 
 
207
@oafiid: The factory's OAFIID
 
208
@descr: Description of the factory
 
209
@version: Version string of the factory program
 
210
@callback: Function (#BonoboFactoryCallback) responsible for intantiating components
 
211
@data: Additional data to be passed to the callback
 
212
@quit_timeout: Ammount of time to wait (in milliseconds) before deciding to quit the factory.  A larger value prevents frequent respawning of a new factory process when there are many consecutive one-time requests, so that your factory appears to start faster after the first time.
230
213
 
231
214