~robertcarr/mir/send-clients-input

« back to all changes in this revision

Viewing changes to include/mir_toolkit/mir_client_library.h

  • Committer: Daniel van Vugt
  • Date: 2013-03-07 08:04:05 UTC
  • mfrom: (467.1.6 trunk)
  • mto: (467.1.21 trunk)
  • mto: This revision was merged to the branch mainline in revision 486.
  • Revision ID: daniel.van.vugt@canonical.com-20130307080405-vgn5g2ts7j08xekk
Merge latest lp:mir

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright © 2012 Canonical Ltd.
3
3
 *
4
 
 * This program is free software: you can redistribute it and/or modify
5
 
 * it under the terms of the GNU General Public License version 3 as
6
 
 * published by the Free Software Foundation.
 
4
 * This program is free software: you can redistribute it and/or modify it
 
5
 * under the terms of the GNU Lesser General Public License version 3,
 
6
 * as published by the Free Software Foundation.
7
7
 *
8
8
 * This program is distributed in the hope that it will be useful,
9
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
11
 * GNU General Public License for more details.
12
12
 *
13
 
 * You should have received a copy of the GNU General Public License
 
13
 * You should have received a copy of the GNU Lesser General Public License
14
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
15
 *
16
16
 */
19
19
#define MIR_CLIENT_LIBRARY_H
20
20
 
21
21
#ifdef __cplusplus
 
22
/** The C client API
 
23
 */
 
24
namespace mir_toolkit {
22
25
extern "C" {
23
26
#endif
24
27
 
144
147
 * Request a connection to the MIR server. The supplied callback is
145
148
 * called when the connection is established, or fails. The returned
146
149
 * wait handle remains valid until the connection has been released.
147
 
 *   \param [in] server       a name identifying the server
148
 
 *   \param [in] app_name     a name referring to the application
149
 
 *   \param [in] callback     callback function to be invoked when request
150
 
 *                            completes
151
 
 *   \param [in,out] context  passed to the callback function
152
 
 *   \return                  a handle that can be passed to mir_wait_for
 
150
 *   \param [in] server              a name identifying the server
 
151
 *   \param [in] app_name            a name referring to the application
 
152
 *   \param [in] callback            callback function to be invoked when request
 
153
 *                                   completes
 
154
 *   \param [in,out] client_context  passed to the callback function
 
155
 *   \return                         a handle that can be passed to mir_wait_for
153
156
 */
154
157
MirWaitHandle *mir_connect(
155
158
    char const *server,
268
271
 * memory.
269
272
 *   \pre                         the surface is valid
270
273
 *   \param [in] surface          the surface
271
 
 *   \param [out] buffer_package  structure to be populated
 
274
 *   \param [out] graphics_region structure to be populated
272
275
 */
273
276
void mir_surface_get_graphics_region(
274
277
    MirSurface *surface,
288
291
MirWaitHandle *mir_surface_next_buffer(
289
292
    MirSurface *surface,
290
293
    mir_surface_lifecycle_callback callback,
291
 
    void *context);
 
294
    void *client_context);
292
295
 
293
296
/**
294
297
 * Release the supplied surface and any associated buffer. The
304
307
MirWaitHandle *mir_surface_release(
305
308
    MirSurface *surface,
306
309
    mir_surface_lifecycle_callback callback,
307
 
    void *context);
 
310
    void *client_context);
308
311
 
309
312
/**
310
313
 * Wait on the supplied handle until the associated request has completed.
321
324
 
322
325
#ifdef __cplusplus
323
326
}
 
327
}
 
328
using namespace mir_toolkit;
324
329
#endif
325
330
 
326
331
#endif /* MIR_CLIENT_LIBRARY_H */