Re: gdk_spawn API proposal
- From: Owen Taylor <otaylor redhat com>
- To: Gtk+ Devel <gtk-devel-list gnome org>
- Cc: Mark McLoughlin <mark skynet ie>
- Subject: Re: gdk_spawn API proposal
- Date: 18 Jul 2003 15:24:10 -0400
On Sun, 2003-04-13 at 20:06, Mark McLoughlin wrote:
> Hi,
> I'd forgotten about this one. The bug is:
>
> http://bugzilla.gnome.org/show_bug.cgi?id=95897
>
> Its not on gtk.org/plan/2.4/ but its still on the 2.4 milestone, so I
> thought I'd put the API out for review.
What do other people think of this? Is this something you'd use
in your applications?
It feels like a bit of a bad match for GDK for me, but I do
see the niche that it's trying to fill, and I don't see anywhere
else that would be *better* than GDK for it if it makes sense
to add.
Regards,
Owen
> =======
>
> Multiscreen applications which launch other applications as a result of
> user interaction need to be able to influence the screen on which the
> launcher application will display.
>
> This can be done by modifying the DISPLAY environment variable of the
> child process so that the default screen of the launcher application is
> the same screen as which the user interaction resulting in the launch
> took place.
>
> This strikes me as a fairly common operation for multiscreen
> applications and, as such, it would useful to provide some form of API
> help.
>
> The API below is implemented in libegg[1]. Originally, a gnome-exec
> form of the API was used for the multiscreen support in gnome-panel,
> gnome-desktop, gnome-session, nautilus and gnome-applets in GNOME 2.2.
>
> There are some issues that definetly need discussion, though:
>
> 1) Is this actually a common enough operation to warrant toolkit level
> support?
>
> 2) Does application launching support belong in the toolkit? If not is
> there any better place for us to provide some form of API to make this
> operation easier?
>
> A proposed API is below.
>
> Good Luck,
> Mark.
>
> [1] - libegg/screen-exec/egg-status-icon.[ch]
>
>
>
> /* Return a copy of the current environment with DISPLAY modified
> * (or added) to the screen/display indicated by @screen.
> */
> gchar **gdk_make_spawn_environment_for_screen (GdkScreen *screen,
> gchar **envp);
>
> /* Wrappers of g_spawn_* but with an extra @screen arg that allows
> * one to spawn a process with DISPLAY set as appropriate so that
> * @screen would be the default screen/display of the spawned process.
> */
> gboolean gdk_spawn_async_on_screen (const gchar *working_directory,
> gchar **argv,
> gchar **envp,
> GSpawnFlags flags,
> GSpawnChildSetupFunc child_setup,
> gpointer user_data,
> GdkScreen *screen,
> gint *child_pid,
> GError **error);
>
> gboolean gdk_spawn_async_with_pipes_on_screen (const gchar *working_directory,
> gchar **argv,
> gchar **envp,
> GSpawnFlags flags,
> GSpawnChildSetupFunc child_setup,
> gpointer user_data,
> GdkScreen *screen,
> gint *child_pid,
> gint *standard_input,
> gint *standard_output,
> gint *standard_error,
> GError **error);
>
> gboolean gdk_spawn_sync_on_screen (const gchar *working_directory,
> gchar **argv,
> gchar **envp,
> GSpawnFlags flags,
> GSpawnChildSetupFunc child_setup,
> gpointer user_data,
> GdkScreen *screen,
> gchar **standard_output,
> gchar **standard_error,
> gint *exit_status,
> GError **error);
>
> gboolean gdk_spawn_command_line_sync_on_screen (const gchar *command_line,
> GdkScreen *screen,
> gchar **standard_output,
> gchar **standard_error,
> gint *exit_status,
> GError **error);
> gboolean gdk_spawn_command_line_async_on_screen (const gchar *command_line,
> GdkScreen *screen,
> GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]