Permalink
Browse files

Update samples to enable use of dialog service

Needed to set window group at the right time.
  • Loading branch information...
1 parent 42b267b commit c7f4f26038e87e0e97bd5b0b0dacd6c8bf20f321 Anthony Hu committed Jul 5, 2012
View
4 Accelerometer/dialogutil.c
@@ -60,6 +60,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -97,8 +99,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 AudioControl/dialogutil.c
@@ -60,6 +60,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -97,8 +99,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 Channels/dialogutil.c
@@ -62,6 +62,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -99,8 +101,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 Dialog/main.c
@@ -59,13 +59,13 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 Geolocation/dialogutil.c
@@ -60,6 +60,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -97,8 +99,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 HttpProxy/dialogutil.c
@@ -60,6 +60,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -97,8 +99,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 LocaleSample/dialogutil.c
@@ -60,6 +60,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -97,8 +99,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 NetworkStatus/dialogutil.c
@@ -60,6 +60,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -97,8 +99,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
5 PaymentService/main.c
@@ -20,7 +20,6 @@
#include <screen/screen.h>
#include <stdio.h>
#include <stdlib.h>
-
static screen_context_t screen_ctx;
static screen_window_t screen_win;
@@ -57,13 +56,13 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 PlayAudio/dialogaudio.c
@@ -60,6 +60,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -97,8 +99,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;
View
4 PlayWav/dialogutil.c
@@ -60,6 +60,8 @@ setup_screen()
return EXIT_FAILURE;
}
+ if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
+
int usage = SCREEN_USAGE_NATIVE;
if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
@@ -97,8 +99,6 @@ setup_screen()
if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
- if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
-
screen_buffer_t buff;
if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void*)&buff) != 0) goto fail;

0 comments on commit c7f4f26

Please sign in to comment.