Mercurial > vim
comparison src/gui_gtk_x11.c @ 944:b2dcb8457067 v7.0.070
updated for version 7.0-070
author | vimboss |
---|---|
date | Tue, 29 Aug 2006 15:30:07 +0000 |
parents | 95c5a7508d2d |
children | a49d06539452 |
comparison
equal
deleted
inserted
replaced
943:e70aad5761b5 | 944:b2dcb8457067 |
---|---|
3231 /*ARGSUSED*/ | 3231 /*ARGSUSED*/ |
3232 static void | 3232 static void |
3233 on_select_tab( | 3233 on_select_tab( |
3234 GtkNotebook *notebook, | 3234 GtkNotebook *notebook, |
3235 GtkNotebookPage *page, | 3235 GtkNotebookPage *page, |
3236 gint index, | 3236 gint idx, |
3237 gpointer data) | 3237 gpointer data) |
3238 { | 3238 { |
3239 if (!ignore_tabline_evt) | 3239 if (!ignore_tabline_evt) |
3240 { | 3240 { |
3241 if (send_tabline_event(index + 1) && gtk_main_level() > 0) | 3241 if (send_tabline_event(idx + 1) && gtk_main_level() > 0) |
3242 gtk_main_quit(); | 3242 gtk_main_quit(); |
3243 } | 3243 } |
3244 } | 3244 } |
3245 | 3245 |
3246 #ifndef HAVE_GTK2 | 3246 #ifndef HAVE_GTK2 |
5301 gui_mch_get_fontname(GuiFont font, char_u *name) | 5301 gui_mch_get_fontname(GuiFont font, char_u *name) |
5302 { | 5302 { |
5303 # ifdef HAVE_GTK2 | 5303 # ifdef HAVE_GTK2 |
5304 if (font != NOFONT) | 5304 if (font != NOFONT) |
5305 { | 5305 { |
5306 char *name = pango_font_description_to_string(font); | 5306 char *pangoname = pango_font_description_to_string(font); |
5307 | 5307 |
5308 if (name != NULL) | 5308 if (pangoname != NULL) |
5309 { | 5309 { |
5310 char_u *s = vim_strsave((char_u *)name); | 5310 char_u *s = vim_strsave((char_u *)pangoname); |
5311 | 5311 |
5312 g_free(name); | 5312 g_free(pangoname); |
5313 return s; | 5313 return s; |
5314 } | 5314 } |
5315 } | 5315 } |
5316 # else | 5316 # else |
5317 /* Don't know how to get the name, return what we got. */ | 5317 /* Don't know how to get the name, return what we got. */ |
6239 void | 6239 void |
6240 gui_mch_invert_rectangle(int r, int c, int nr, int nc) | 6240 gui_mch_invert_rectangle(int r, int c, int nr, int nc) |
6241 { | 6241 { |
6242 GdkGCValues values; | 6242 GdkGCValues values; |
6243 GdkGC *invert_gc; | 6243 GdkGC *invert_gc; |
6244 GdkColor foreground; | |
6245 GdkColor background; | |
6246 | 6244 |
6247 if (gui.drawarea->window == NULL) | 6245 if (gui.drawarea->window == NULL) |
6248 return; | 6246 return; |
6249 | 6247 |
6250 foreground.pixel = gui.norm_pixel ^ gui.back_pixel; | 6248 values.foreground.pixel = gui.norm_pixel ^ gui.back_pixel; |
6251 background.pixel = gui.norm_pixel ^ gui.back_pixel; | 6249 values.background.pixel = gui.norm_pixel ^ gui.back_pixel; |
6252 | |
6253 values.foreground = foreground; | |
6254 values.background = background; | |
6255 values.function = GDK_XOR; | 6250 values.function = GDK_XOR; |
6256 invert_gc = gdk_gc_new_with_values(gui.drawarea->window, | 6251 invert_gc = gdk_gc_new_with_values(gui.drawarea->window, |
6257 &values, | 6252 &values, |
6258 GDK_GC_FOREGROUND | | 6253 GDK_GC_FOREGROUND | |
6259 GDK_GC_BACKGROUND | | 6254 GDK_GC_BACKGROUND | |
6260 GDK_GC_FUNCTION); | 6255 GDK_GC_FUNCTION); |
6261 gdk_gc_set_exposures(invert_gc, gui.visibility != GDK_VISIBILITY_UNOBSCURED); | 6256 gdk_gc_set_exposures(invert_gc, gui.visibility != |
6257 GDK_VISIBILITY_UNOBSCURED); | |
6262 gdk_draw_rectangle(gui.drawarea->window, invert_gc, | 6258 gdk_draw_rectangle(gui.drawarea->window, invert_gc, |
6263 TRUE, | 6259 TRUE, |
6264 FILL_X(c), FILL_Y(r), | 6260 FILL_X(c), FILL_Y(r), |
6265 (nc) * gui.char_width, (nr) * gui.char_height); | 6261 (nc) * gui.char_width, (nr) * gui.char_height); |
6266 gdk_gc_destroy(invert_gc); | 6262 gdk_gc_destroy(invert_gc); |