libgimp/gimp.c libgimp/gimp.h libgimp/gimpmenu.c libgimp/gimpprotocol.c

2000-07-30  Tor Lillqvist  <tml@iki.fi>

	* libgimp/gimp.c
	* libgimp/gimp.h
	* libgimp/gimpmenu.c
	* libgimp/gimpprotocol.c
	* libgimp/gimpprotocol.h
	* libgimp/gimp.def
	* app/plug_in.c
	* plug-ins/helpbrowser/helpbrowser.c
	* plug-ins/script-fu/script-fu.c: As the GLib main loop and IO
	channel implementation on Win32 now provides the same interface as
	that on Unix, much of the Win32-only crap could be
	removed. Especially, no need for "wakeup" out-of-band messages to
	wake up pipe readers. No need for plug-ins to tell GIMP their
	thread id.

	* libgimp/gimp.c (gimp_extension_process): On Win32, use the new
	g_io_channel_win32_wait_for_condition() function.

	* plug-ins/makefile.cygwin: Add the homogenizer plug-in to the
	unofficial part.
This commit is contained in:
Tor Lillqvist 2000-07-29 21:32:55 +00:00 committed by Tor Lillqvist
parent 64cb0da0fc
commit 47328ffd2e
32 changed files with 58 additions and 966 deletions

View File

@ -1,3 +1,26 @@
2000-07-30 Tor Lillqvist <tml@iki.fi>
* libgimp/gimp.c
* libgimp/gimp.h
* libgimp/gimpmenu.c
* libgimp/gimpprotocol.c
* libgimp/gimpprotocol.h
* libgimp/gimp.def
* app/plug_in.c
* plug-ins/helpbrowser/helpbrowser.c
* plug-ins/script-fu/script-fu.c: As the GLib main loop and IO
channel implementation on Win32 now provides the same interface as
that on Unix, much of the Win32-only crap could be
removed. Especially, no need for "wakeup" out-of-band messages to
wake up pipe readers. No need for plug-ins to tell GIMP their
thread id.
* libgimp/gimp.c (gimp_extension_process): On Win32, use the new
g_io_channel_win32_wait_for_condition() function.
* plug-ins/makefile.cygwin: Add the homogenizer plug-in to the
unofficial part.
2000-07-29 Sven Neumann <sven@gimp.org>
* app/main.c: no need to mark this string for translation

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -946,8 +946,6 @@ xspawnv (gint mode,
}
return pid;
}
#undef _spawnv
#define _spawnv xspawnv
#endif /* G_OS_WIN32 */
@ -976,35 +974,17 @@ plug_in_open (PlugIn *plug_in)
setmode (my_write[1], _O_BINARY);
#endif
#ifndef G_OS_WIN32
plug_in->my_read = g_io_channel_unix_new (my_read[0]);
plug_in->my_write = g_io_channel_unix_new (my_write[1]);
plug_in->his_read = g_io_channel_unix_new (my_write[0]);
plug_in->his_write = g_io_channel_unix_new (my_read[1]);
#else
plug_in->my_read = g_io_channel_win32_new_pipe (my_read[0]);
plug_in->his_read = g_io_channel_win32_new_pipe (my_write[0]);
plug_in->his_read_fd = my_write[0];
plug_in->my_write = g_io_channel_win32_new_pipe (my_write[1]);
plug_in->his_write = g_io_channel_win32_new_pipe (my_read[1]);
#endif
/* Remember the file descriptors for the pipes.
*/
#ifndef G_OS_WIN32
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d", g_io_channel_unix_get_fd (plug_in->his_write));
#else
plug_in->args[2] =
g_strdup_printf ("%d", g_io_channel_win32_get_fd (plug_in->his_read));
plug_in->args[3] =
g_strdup_printf ("%d:%u:%d",
g_io_channel_win32_get_fd (plug_in->his_write),
GetCurrentThreadId (),
g_io_channel_win32_get_fd (plug_in->my_read));
#endif
/* Set the rest of the command line arguments.
*/
@ -1028,7 +1008,7 @@ plug_in_open (PlugIn *plug_in)
fcntl (my_write[1], F_SETFD, 1);
#endif
#if defined(G_OS_WIN32) || defined (G_WITH_CYGWIN) || defined(__EMX__)
plug_in->pid = _spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
plug_in->pid = xspawnv (_P_NOWAIT, plug_in->args[0], plug_in->args);
if (plug_in->pid == -1)
#else
plug_in->pid = fork ();
@ -1065,19 +1045,6 @@ plug_in_open (PlugIn *plug_in)
g_io_channel_unref (plug_in->his_write);
plug_in->his_write = NULL;
#ifdef G_OS_WIN32
/* The plug-in tells us its thread id */
if (!plug_in->query)
{
if (!wire_read_int32 (plug_in->my_read, &plug_in->his_thread_id, 1))
{
g_message ("Unable to read Plug-In's thread id");
plug_in_destroy (plug_in);
return FALSE;
}
}
#endif
if (!plug_in->synchronous)
{
plug_in->input_id =
@ -1554,13 +1521,6 @@ plug_in_handle_message (WireMessage *msg)
case GP_EXTENSION_ACK:
gtk_main_quit ();
break;
case GP_REQUEST_WAKEUPS:
#ifdef G_OS_WIN32
g_io_channel_win32_pipe_request_wakeups (current_plug_in->my_write,
current_plug_in->his_thread_id,
current_plug_in->his_read_fd);
#endif
break;
}
}

View File

@ -169,14 +169,14 @@ gimp_main (int argc,
char *argv[])
{
#ifdef G_OS_WIN32
char *peer, *peer_fd;
guint32 thread;
int i, j, k;
#endif
setlocale (LC_NUMERIC, "C");
#ifdef G_OS_WIN32
g_assert (PLUG_IN_INFO_PTR != NULL);
/* Check for exe file name with spaces in the path having been split up
* by buggy NT C runtime, or something. I don't know why this happens
* on NT (including w2k), but not on w95/98.
@ -241,22 +241,12 @@ gimp_main (int argc,
gimp_signal_private (SIGCHLD, gimp_plugin_sigchld_handler, SA_RESTART);
#endif
#ifndef G_OS_WIN32
_readchannel = g_io_channel_unix_new (atoi (argv[2]));
_writechannel = g_io_channel_unix_new (atoi (argv[3]));
#ifdef __EMX__
setmode (g_io_channel_unix_get_fd (_readchannel), O_BINARY);
setmode (g_io_channel_unix_get_fd (_writechannel), O_BINARY);
#endif
#else
g_assert (PLUG_IN_INFO_PTR != NULL);
_readchannel = g_io_channel_win32_new_pipe (atoi (argv[2]));
peer = strchr (argv[3], ':') + 1;
peer_fd = strchr (peer, ':') + 1;
_writechannel = g_io_channel_win32_new_pipe_with_wakeups (atoi (argv[3]),
atoi (peer),
atoi (peer_fd));
#endif
gp_init ();
wire_set_writer (gimp_write);
@ -274,13 +264,6 @@ gimp_main (int argc,
GIMP_STACK_TRACE_NEVER,
GIMP_STACK_TRACE_ALWAYS);
#ifdef G_OS_WIN32
/* Tell the GIMP our thread id */
thread = GetCurrentThreadId ();
wire_write_int32 (_writechannel, &thread, 1);
wire_flush (_writechannel);
#endif
g_set_message_handler ((GPrintFunc) gimp_message_func);
temp_proc_ht = g_hash_table_new (&g_str_hash, &g_str_equal);
@ -823,20 +806,7 @@ gimp_extension_process (guint timeout)
gimp_quit ();
}
#else
/* ??? */
MSG msg;
UINT timer;
static UINT message = 0;
if (message == 0)
message = RegisterWindowMessage ("g-pipe-readable");
if (timeout > 0)
timer = SetTimer (NULL, 0, timeout, NULL);
WaitMessage ();
if (timeout > 0)
KillTimer (NULL, timer);
if (PeekMessage (&msg, (HWND) -1, message, message, PM_NOREMOVE))
if (g_io_channel_win32_wait_for_condition (_readchannel, G_IO_IN, timeout) == 1)
gimp_single_message ();
#endif
}
@ -855,13 +825,6 @@ gimp_run_temp (void)
gimp_single_message ();
}
void
gimp_request_wakeups (void)
{
if (!gp_request_wakeups_write (_writechannel))
gimp_quit ();
}
gchar *
gimp_get_progname (void)
{

View File

@ -286,7 +286,6 @@ EXPORTS
gimp_register_load_handler
gimp_register_magic_load_handler
gimp_register_save_handler
gimp_request_wakeups
gimp_rgb_to_hls
gimp_rgb_to_hsv
gimp_rgb_to_hsv4

View File

@ -319,7 +319,6 @@ gboolean gimp_install_cmap (void);
gboolean gimp_use_xshm (void);
guchar * gimp_color_cube (void);
gint gimp_min_colors (void);
void gimp_request_wakeups (void);
gchar * gimp_get_progname (void);

View File

@ -937,9 +937,6 @@ gimp_setup_callbacks (void)
/* Tie into the gdk input function only once */
g_io_add_watch (_readchannel, G_IO_IN | G_IO_PRI, input_callback, NULL);
/* This needed on Win32 */
gimp_request_wakeups ();
first_time = FALSE;
}
}

View File

@ -98,12 +98,6 @@ static void _gp_extension_ack_write (GIOChannel *channel,
WireMessage *msg);
static void _gp_extension_ack_destroy (WireMessage *msg);
static void _gp_request_wakeups_read (GIOChannel *channel,
WireMessage *msg);
static void _gp_request_wakeups_write (GIOChannel *channel,
WireMessage *msg);
static void _gp_request_wakeups_destroy (WireMessage *msg);
static void _gp_params_read (GIOChannel *channel,
GPParam **params,
guint *nparams);
@ -167,10 +161,6 @@ gp_init (void)
_gp_extension_ack_read,
_gp_extension_ack_write,
_gp_extension_ack_destroy);
wire_register (GP_REQUEST_WAKEUPS,
_gp_request_wakeups_read,
_gp_request_wakeups_write,
_gp_request_wakeups_destroy);
}
gboolean
@ -362,21 +352,6 @@ gp_extension_ack_write (GIOChannel *channel)
return TRUE;
}
gboolean
gp_request_wakeups_write (GIOChannel *channel)
{
WireMessage msg;
msg.type = GP_REQUEST_WAKEUPS;
msg.data = NULL;
if (!wire_write_msg (channel, &msg))
return FALSE;
if (!wire_flush (channel))
return FALSE;
return TRUE;
}
/* quit */
static void
@ -1005,25 +980,6 @@ _gp_extension_ack_destroy (WireMessage *msg)
{
}
/* request_wakeups */
static void
_gp_request_wakeups_read (GIOChannel *channel,
WireMessage *msg)
{
}
static void
_gp_request_wakeups_write (GIOChannel *channel,
WireMessage *msg)
{
}
static void
_gp_request_wakeups_destroy (WireMessage *msg)
{
}
/* params */
static void

View File

@ -45,8 +45,7 @@ enum
GP_TEMP_PROC_RETURN,
GP_PROC_INSTALL,
GP_PROC_UNINSTALL,
GP_EXTENSION_ACK,
GP_REQUEST_WAKEUPS
GP_EXTENSION_ACK
};
@ -209,7 +208,6 @@ gboolean gp_proc_install_write (GIOChannel *channel,
gboolean gp_proc_uninstall_write (GIOChannel *channel,
GPProcUninstall *proc_uninstall);
gboolean gp_extension_ack_write (GIOChannel *channel);
gboolean gp_request_wakeups_write (GIOChannel *channel);
#ifdef __cplusplus

View File

@ -98,12 +98,6 @@ static void _gp_extension_ack_write (GIOChannel *channel,
WireMessage *msg);
static void _gp_extension_ack_destroy (WireMessage *msg);
static void _gp_request_wakeups_read (GIOChannel *channel,
WireMessage *msg);
static void _gp_request_wakeups_write (GIOChannel *channel,
WireMessage *msg);
static void _gp_request_wakeups_destroy (WireMessage *msg);
static void _gp_params_read (GIOChannel *channel,
GPParam **params,
guint *nparams);
@ -167,10 +161,6 @@ gp_init (void)
_gp_extension_ack_read,
_gp_extension_ack_write,
_gp_extension_ack_destroy);
wire_register (GP_REQUEST_WAKEUPS,
_gp_request_wakeups_read,
_gp_request_wakeups_write,
_gp_request_wakeups_destroy);
}
gboolean
@ -362,21 +352,6 @@ gp_extension_ack_write (GIOChannel *channel)
return TRUE;
}
gboolean
gp_request_wakeups_write (GIOChannel *channel)
{
WireMessage msg;
msg.type = GP_REQUEST_WAKEUPS;
msg.data = NULL;
if (!wire_write_msg (channel, &msg))
return FALSE;
if (!wire_flush (channel))
return FALSE;
return TRUE;
}
/* quit */
static void
@ -1005,25 +980,6 @@ _gp_extension_ack_destroy (WireMessage *msg)
{
}
/* request_wakeups */
static void
_gp_request_wakeups_read (GIOChannel *channel,
WireMessage *msg)
{
}
static void
_gp_request_wakeups_write (GIOChannel *channel,
WireMessage *msg)
{
}
static void
_gp_request_wakeups_destroy (WireMessage *msg)
{
}
/* params */
static void

View File

@ -45,8 +45,7 @@ enum
GP_TEMP_PROC_RETURN,
GP_PROC_INSTALL,
GP_PROC_UNINSTALL,
GP_EXTENSION_ACK,
GP_REQUEST_WAKEUPS
GP_EXTENSION_ACK
};
@ -209,7 +208,6 @@ gboolean gp_proc_install_write (GIOChannel *channel,
gboolean gp_proc_uninstall_write (GIOChannel *channel,
GPProcUninstall *proc_uninstall);
gboolean gp_extension_ack_write (GIOChannel *channel);
gboolean gp_request_wakeups_write (GIOChannel *channel);
#ifdef __cplusplus

View File

@ -1077,9 +1077,6 @@ install_temp_proc (void)
/* Tie into the gdk input function */
g_io_add_watch (_readchannel, G_IO_IN | G_IO_PRI, input_callback, NULL);
/* This needed on Win32 */
gimp_request_wakeups ();
temp_proc_installed = TRUE;
}

View File

@ -45,7 +45,7 @@ SEPARATE = AlienMap AlienMap2 FractalExplorer Lighting MapObject bmp dbbrowser f
# ../unofficial-plug-ins directory, go there, and do "make -f
# makefile.cygwin unofficial".
UNOFFICIAL = Anamorphose DigitalSignature RGB_Displace ccanalyze fixer gdyntext gimp_ace guash kaleidoscope logconv sel_gauss magiceye mathmap psd_save resynthesizer user_filter
UNOFFICIAL = Anamorphose DigitalSignature RGB_Displace ccanalyze fixer gdyntext gimp_ace guash homogenizer kaleidoscope logconv sel_gauss magiceye mathmap psd_save resynthesizer user_filter
# The main target
@ -301,6 +301,15 @@ OBJECTS = \
queue.o
endif
ifdef EXTRA_homogenizer
CXX = c++ -mno-cygwin -mpentium -fnative-struct
OBJECTS = \
homogenize.o
EXTRALIBS = -lstdc++
.cc.o:
$(CXX) $(CFLAGS) -c $< -o $@
endif
ifdef EXTRA_ifscompose
OBJECTS = \
ifscompose.o \

View File

@ -234,9 +234,6 @@ run (gchar *name,
/* Acknowledge that the extension is properly initialized */
gimp_extension_ack ();
/* We need wakeups (on Win32) when getting callbacks from the GIMP */
gimp_request_wakeups ();
while (1)
gimp_extension_process (0);