forked from enlightenment/efl
parent
990d1ab9e2
commit
96b4289af6
|
@ -11,5 +11,6 @@ event_handler_example
|
|||
exe_example
|
||||
list_destroy_example
|
||||
list_example
|
||||
output_tester
|
||||
timer_example
|
||||
x_window_example
|
||||
|
|
|
@ -5,6 +5,7 @@ event_handler_example \
|
|||
args_example \
|
||||
list_example \
|
||||
list_destroy_example \
|
||||
output_tester \
|
||||
exe_example
|
||||
|
||||
if BUILD_ECORE_CON
|
||||
|
@ -43,6 +44,7 @@ list_destroy_example_SOURCES = list_destroy_example.c
|
|||
event_handler_example_SOURCES = event_handler_example.c
|
||||
args_example_SOURCES = args_example.c
|
||||
exe_example_SOURCES = exe_example.c
|
||||
output_tester_SOURCES = output_tester.c
|
||||
|
||||
if BUILD_ECORE_CON
|
||||
con_server_example_SOURCES = con_server_example.c
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/* output and error tester.
|
||||
*/
|
||||
|
||||
#include <Ecore.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
Ecore_Timer *timer1 = NULL;
|
||||
|
||||
char *data1 = "data1";
|
||||
|
||||
int
|
||||
timer1_tick(void *data)
|
||||
{
|
||||
printf("Once only timer called at %3.2f seconds, data %p\n",
|
||||
ecore_time_get(), data);
|
||||
fprintf(stderr, "This is an error message from the timer callback.\n");
|
||||
fprintf(stdout, "This is an output message from the timer callback.\n");
|
||||
ecore_main_loop_quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
ecore_init();
|
||||
timer1 = ecore_timer_add(5.0, timer1_tick, data1);
|
||||
fprintf(stdout, "This is an output message from the main function.\n");
|
||||
fprintf(stderr, "This is an error message from the main function.\n");
|
||||
ecore_main_loop_begin();
|
||||
ecore_shutdown();
|
||||
return 123;
|
||||
}
|
Loading…
Reference in New Issue