2003-03-28 22:13:54 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2003-07-03 08:47:26 +08:00
|
|
|
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
|
2003-03-28 22:13:54 +08:00
|
|
|
*
|
|
|
|
* gimpfontselect_pdb.c
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This library is free software: you can redistribute it and/or
|
2003-03-28 22:13:54 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-18 06:28:01 +08:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2003-03-28 22:13:54 +08:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-01-18 06:28:01 +08:00
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
2003-03-28 22:13:54 +08:00
|
|
|
*/
|
|
|
|
|
2007-01-09 18:52:47 +08:00
|
|
|
/* NOTE: This file is auto-generated by pdbgen.pl */
|
2003-03-28 22:13:54 +08:00
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "gimp.h"
|
|
|
|
|
2010-07-07 17:43:10 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SECTION: gimpfontselect
|
|
|
|
* @title: gimpfontselect
|
|
|
|
* @short_description: Functions providing a font selection dialog.
|
|
|
|
*
|
|
|
|
* Functions providing a font selection dialog.
|
|
|
|
**/
|
|
|
|
|
|
|
|
|
2003-03-28 22:13:54 +08:00
|
|
|
/**
|
|
|
|
* gimp_fonts_popup:
|
|
|
|
* @font_callback: The callback PDB proc to call when font selection is made.
|
2007-01-09 18:52:47 +08:00
|
|
|
* @popup_title: Title of the font selection dialog.
|
2003-03-28 22:13:54 +08:00
|
|
|
* @initial_font: The name of the font to set as the first selected.
|
|
|
|
*
|
|
|
|
* Invokes the Gimp font selection.
|
|
|
|
*
|
2007-01-09 18:52:47 +08:00
|
|
|
* This procedure opens the font selection dialog.
|
2003-03-28 22:13:54 +08:00
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
2010-09-16 04:07:36 +08:00
|
|
|
**/
|
2003-03-28 22:13:54 +08:00
|
|
|
gboolean
|
2003-07-02 09:20:08 +08:00
|
|
|
gimp_fonts_popup (const gchar *font_callback,
|
2006-04-12 18:27:31 +08:00
|
|
|
const gchar *popup_title,
|
|
|
|
const gchar *initial_font)
|
2003-03-28 22:13:54 +08:00
|
|
|
{
|
|
|
|
GimpParam *return_vals;
|
|
|
|
gint nreturn_vals;
|
|
|
|
gboolean success = TRUE;
|
|
|
|
|
2005-08-03 06:52:23 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp-fonts-popup",
|
2006-04-12 18:27:31 +08:00
|
|
|
&nreturn_vals,
|
|
|
|
GIMP_PDB_STRING, font_callback,
|
|
|
|
GIMP_PDB_STRING, popup_title,
|
|
|
|
GIMP_PDB_STRING, initial_font,
|
|
|
|
GIMP_PDB_END);
|
2003-03-28 22:13:54 +08:00
|
|
|
|
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return success;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gimp_fonts_close_popup:
|
2007-01-09 18:52:47 +08:00
|
|
|
* @font_callback: The name of the callback registered for this pop-up.
|
2003-03-28 22:13:54 +08:00
|
|
|
*
|
2007-01-09 18:52:47 +08:00
|
|
|
* Close the font selection dialog.
|
2003-03-28 22:13:54 +08:00
|
|
|
*
|
|
|
|
* This procedure closes an opened font selection dialog.
|
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
2010-09-16 04:07:36 +08:00
|
|
|
**/
|
2003-03-28 22:13:54 +08:00
|
|
|
gboolean
|
2003-07-02 09:20:08 +08:00
|
|
|
gimp_fonts_close_popup (const gchar *font_callback)
|
2003-03-28 22:13:54 +08:00
|
|
|
{
|
|
|
|
GimpParam *return_vals;
|
|
|
|
gint nreturn_vals;
|
|
|
|
gboolean success = TRUE;
|
|
|
|
|
2005-08-03 06:52:23 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp-fonts-close-popup",
|
2006-04-12 18:27:31 +08:00
|
|
|
&nreturn_vals,
|
|
|
|
GIMP_PDB_STRING, font_callback,
|
|
|
|
GIMP_PDB_END);
|
2003-03-28 22:13:54 +08:00
|
|
|
|
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return success;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gimp_fonts_set_popup:
|
2007-01-09 18:52:47 +08:00
|
|
|
* @font_callback: The name of the callback registered for this pop-up.
|
2003-03-28 22:13:54 +08:00
|
|
|
* @font_name: The name of the font to set as selected.
|
|
|
|
*
|
2007-01-09 18:52:47 +08:00
|
|
|
* Sets the current font in a font selection dialog.
|
2003-03-28 22:13:54 +08:00
|
|
|
*
|
2007-01-09 18:52:47 +08:00
|
|
|
* Sets the current font in a font selection dialog.
|
2003-03-28 22:13:54 +08:00
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
2010-09-16 04:07:36 +08:00
|
|
|
**/
|
2003-03-28 22:13:54 +08:00
|
|
|
gboolean
|
2003-07-02 09:20:08 +08:00
|
|
|
gimp_fonts_set_popup (const gchar *font_callback,
|
2006-04-12 18:27:31 +08:00
|
|
|
const gchar *font_name)
|
2003-03-28 22:13:54 +08:00
|
|
|
{
|
|
|
|
GimpParam *return_vals;
|
|
|
|
gint nreturn_vals;
|
|
|
|
gboolean success = TRUE;
|
|
|
|
|
2005-08-03 06:52:23 +08:00
|
|
|
return_vals = gimp_run_procedure ("gimp-fonts-set-popup",
|
2006-04-12 18:27:31 +08:00
|
|
|
&nreturn_vals,
|
|
|
|
GIMP_PDB_STRING, font_callback,
|
|
|
|
GIMP_PDB_STRING, font_name,
|
|
|
|
GIMP_PDB_END);
|
2003-03-28 22:13:54 +08:00
|
|
|
|
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
|
|
|
|
|
|
|
return success;
|
|
|
|
}
|