Mercurial > vim
comparison src/gui_gtk_x11.c @ 39:410fa1a31baf v7.0023
updated for version 7.0023
author | vimboss |
---|---|
date | Sun, 19 Dec 2004 22:46:22 +0000 |
parents | c524f99c7925 |
children | 088a834ca0aa |
comparison
equal
deleted
inserted
replaced
38:c524f99c7925 | 39:410fa1a31baf |
---|---|
4790 #endif | 4790 #endif |
4791 | 4791 |
4792 return font; | 4792 return font; |
4793 } | 4793 } |
4794 | 4794 |
4795 #if defined(FEAT_EVAL) || defined(PROTO) | |
4795 /* | 4796 /* |
4796 * Return the name of font "font" in allocated memory. | 4797 * Return the name of font "font" in allocated memory. |
4797 */ | 4798 */ |
4798 /*ARGSUSED*/ | 4799 /*ARGSUSED*/ |
4799 char_u * | 4800 char_u * |
4800 gui_mch_get_fontname(GuiFont font, char_u *name) | 4801 gui_mch_get_fontname(GuiFont font, char_u *name) |
4801 { | 4802 { |
4802 #ifdef HAVE_GTK2 | 4803 # ifdef HAVE_GTK2 |
4803 if (font != NOFONT) | 4804 if (font != NOFONT) |
4804 { | 4805 { |
4805 char *name = pango_font_description_to_string(font); | 4806 char *name = pango_font_description_to_string(font); |
4806 | 4807 |
4807 if (name != NULL) | 4808 if (name != NULL) |
4810 | 4811 |
4811 g_free(name); | 4812 g_free(name); |
4812 return s; | 4813 return s; |
4813 } | 4814 } |
4814 } | 4815 } |
4815 #else | 4816 # else |
4816 /* Don't know how to get the name, return what we got. */ | 4817 /* Don't know how to get the name, return what we got. */ |
4817 if (name != NULL) | 4818 if (name != NULL) |
4818 return vim_strsave(name); | 4819 return vim_strsave(name); |
4819 #endif | 4820 # endif |
4820 return NULL; | 4821 return NULL; |
4821 } | 4822 } |
4823 #endif | |
4822 | 4824 |
4823 #if !defined(HAVE_GTK2) || defined(PROTO) | 4825 #if !defined(HAVE_GTK2) || defined(PROTO) |
4824 /* | 4826 /* |
4825 * Set the current text font. | 4827 * Set the current text font. |
4826 * Since we create all GC on demand, we use just gui.current_font to | 4828 * Since we create all GC on demand, we use just gui.current_font to |