~cemil-azizoglu/mir/enum-deprecation

« back to all changes in this revision

Viewing changes to examples/basic.c

  • Committer: Cemil Azizoglu
  • Date: 2017-01-03 18:06:41 UTC
  • Revision ID: cemil.azizoglu@canonical.com-20170103180641-1kv03uueb1kercvn
mir_window_create and mir_window_create_sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    ((MirDemoState*)context)->connection = new_connection;
68
68
}
69
69
 
70
 
// Callback to update MirDemoState on surface_create
71
 
static void surface_create_callback(MirSurface *new_surface, void *context)
72
 
{
73
 
    ((MirDemoState*)context)->surface = new_surface;
74
 
}
75
 
 
76
70
// Callback to update MirDemoState on surface_release
77
71
static void surface_release_callback(MirSurface *old_surface, void *context)
78
72
{
140
134
    mir_window_spec_set_name(spec, __FILE__);
141
135
 
142
136
    ///\internal [surface_create_tag]
143
 
    // ...we create a surface using that format and wait for callback to complete.
144
 
    mir_wait_for(mir_surface_create(spec, surface_create_callback, &mcd));
 
137
    // ...we create a surface using that format.
 
138
    mcd.surface = mir_window_create_sync(spec);
145
139
    puts("Surface created");
146
140
    ///\internal [surface_create_tag]
147
141