Added:
trunk/imbus/daemon/engine_signal.h
Modified:
trunk/imbus/daemon/main.c
Log:
start engine signal implementation
Added: trunk/imbus/daemon/engine_signal.h
==============================================================================
--- (empty file)
+++ trunk/imbus/daemon/engine_signal.h Thu Sep 11 00:58:56 2008
@@ -0,0 +1,21 @@
+#ifndef __IM_ENGINE_SIGNAL__
+#define __IM_ENGINE_SIGNAL__
+
+typedef struct
+{
+ const IMChar *name;
+ IMInt uid;
+ IMInt args;
+} _im_engine_signal;
+
+/* TODO: engine signals */
+
+_im_engine_signal im_engine_signal[] =
+{
+ { "QUIT", 0, 0 },
+ { "PAGEUP", 1, 1 },
+ { "PAGEDOWN", 2, 1 },
+
+};
+
+#endif
Modified: trunk/imbus/daemon/main.c
==============================================================================
--- trunk/imbus/daemon/main.c (original)
+++ trunk/imbus/daemon/main.c Thu Sep 11 00:58:56 2008
@@ -19,13 +19,13 @@
im_print_log( "Receive data from watch id = " );
printf( "%d\n", watch_id );
- while ( ( ret = im_connection_pending (connection, &error ) ) > 0) {
+ while( ( ret = im_connection_pending( connection, &error ) ) > 0) {
obj = im_connection_next( connection, &timeout, &error );
if (obj) {
im_stream_put_object( stream, obj );
im_stream_write( stream, out, &timeout, &error );
- if (im_object_get_type (obj) == IM_TYPE_STRING &&
+ if (im_object_get_type( obj ) == IM_TYPE_STRING &&
im_string_compare_str( IM_STRING( obj ), "quit" ) == 0 ) {
im_print_log( "Exit imbus Loop.\n" );
im_main_loop_quit( loop );