xgeipc.h

Go to the documentation of this file.
00001 
00002 /* ///////////////////////////////////////////////////////////////////////// */
00003 /* This file is a part of the BSTools package                                */
00004 /* written by Przemyslaw Kiciak                                              */
00005 /* ///////////////////////////////////////////////////////////////////////// */
00006 /* (C) Copyright by Przemyslaw Kiciak, 2009                                  */
00007 /* this package is distributed under the terms of the                        */
00008 /* Lesser GNU Public License, see the file COPYING.LIB                       */
00009 /* ///////////////////////////////////////////////////////////////////////// */
00010 
00011 #ifndef XGEIPC_H
00012 #define XGEIPC_H
00013 
00014 #ifndef _LIBC_LIMITS_H_
00015 #include <limits.h>
00016 #endif
00017 
00018 #ifndef XGEDIT_H
00019 #include "xgedit.h"
00020 #endif
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 extern pid_t xge_parent_pid, xge_child_pid;
00027 extern int xge_pipe_in[2], xge_pipe_out[2];
00028 extern Window xgeparentwindow, xgechildwindow;
00029 
00030 extern void (*xge_childcallback) ( int msg, int size );
00031 
00032 /* the procedures of the parent process */
00033 boolean xge_MakeTheChild ( const char *name, const char *suffix, int magic );
00034 boolean xge_ChildIsActive ( void );
00035 void xge_CallTheChild ( int cmd, int size );
00036 void xge_SignalTheChild ( void );
00037 void xge_ParentFlushPipe ( void );
00038 
00039 /* the procedures of the child process */
00040 void xge_CallTheParent ( int cmd, int size );
00041 void xge_ChildCallYourself ( int cmd );
00042 void xge_ChildMessageLoop ( void );
00043 void xge_ChildFlushPipe ( void );
00044 boolean xge_ChildInit ( int argc, char **argv, int magic,
00045                         void (*callback) ( int msg, int size ) );
00046 
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050 
00051 #endif
00052