1 /******************************************************************************* 2 * * 3 * fontsel.h -- Nirvana Editor Font Selector Dialog Header File * 4 * * 5 * Copyright 2003 The NEdit Developers * 6 * * 7 * This is free software; you can redistribute it and/or modify it under the * 8 * terms of the GNU General Public License as published by the Free Software * 9 * Foundation; either version 2 of the License, or (at your option) any later *10 * version. In addition, you may distribute versions of this program linked to *11 * Motif or Open Motif. See README for details. *12 * *13 * This software is distributed in the hope that it will be useful, but WITHOUT *14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *16 * more details. *17 * *18 * You should have received a copy of the GNU General Public License along with *19 * software; if not, write to the Free Software Foundation, Inc., 59 Temple *20 * Place, Suite 330, Boston, MA 02111-1307 USA *21 * *22 * Nirvana Text Editor *23 * July 31, 2001 *24 * *25 *******************************************************************************/26 27 #ifndefNEDIT_FONTSEL_H_INCLUDED28 #defineNEDIT_FONTSEL_H_INCLUDED29 30 #include<X11/Intrinsic.h>31 #include<X11/Xft/Xft.h>32 33 /*******************************************************************************34 * *35 * FontSel () *36 * *37 * *38 * Function to put up a modal font selection dialog box. The purpose *39 * of this routine is to allow the user to interactively view sample *40 * fonts and to choose a font for current use. *41 * *42 * Arguments: *43 * *44 * Widget parent - parent widget ID *45 * *46 * char * currFont - ASCII string that contains the name *47 * of the currently selected font. *48 * *49 * Returns: *50 * *51 * pointer to an ASCII character string that contains the name of *52 * the selected font (in X format for naming fonts); it is the users *53 * responsibility to free the space allocated to this string. *54 * *55 * Comments: *56 * *57 * The calling function has to call the appropriate routines to set *58 * the current font to the one represented by the returned string. *59 * *60 *******************************************************************************/61 62 63 /* function prototype */64 65 char *FontSel(Widget parent, constchar *curFont);
66 67 char* FontNameAddAttribute(
68 constchar *name,
69 size_t len,
70 constchar *attribute,
71 constchar *value);
72 73 void FontSelSetColors(XftColor fg, Pixel bg);
74 75 #endif/* NEDIT_FONTSEL_H_INCLUDED */76