2000-05-31 21:24:14 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
|
|
|
* gimpdisplay_pdb.c
|
1998-01-25 18:26:47 +08:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
1999-11-18 05:13:50 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1998-01-25 18:26:47 +08:00
|
|
|
* License as published by the Free Software Foundation; either
|
2000-05-31 21:24:14 +08:00
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
1998-01-25 18:26:47 +08:00
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
1999-11-18 05:13:50 +08:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1998-04-13 13:44:11 +08:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
2000-05-31 21:24:14 +08:00
|
|
|
*/
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "gimp.h"
|
|
|
|
|
|
|
|
|
|
|
|
gint32
|
|
|
|
gimp_display_new (gint32 image_ID)
|
|
|
|
{
|
|
|
|
GParam *return_vals;
|
2000-05-31 21:24:14 +08:00
|
|
|
gint nreturn_vals;
|
1997-11-25 06:05:25 +08:00
|
|
|
gint32 display_ID;
|
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_display_new",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_IMAGE, image_ID,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
display_ID = -1;
|
|
|
|
if (return_vals[0].data.d_status == STATUS_SUCCESS)
|
|
|
|
display_ID = return_vals[1].data.d_display;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return display_ID;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gimp_display_delete (gint32 display_ID)
|
|
|
|
{
|
|
|
|
GParam *return_vals;
|
2000-05-31 21:24:14 +08:00
|
|
|
gint nreturn_vals;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_display_delete",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_DISPLAY, display_ID,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2000-05-31 21:24:14 +08:00
|
|
|
gimp_displays_flush (void)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
|
|
|
GParam *return_vals;
|
2000-05-31 21:24:14 +08:00
|
|
|
gint nreturn_vals;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_displays_flush",
|
|
|
|
&nreturn_vals,
|
|
|
|
PARAM_END);
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
}
|