comparison libvo/x11_common.c @ 27343:5fe6a8adf569

Rename two GUI-related preprocessor directives: HAVE_NEW_GUI --> CONFIG_GUI, HAVE_GTK2_GUI --> CONFIG_GTK2
author diego
date Wed, 30 Jul 2008 13:44:59 +0000
parents 7a650839fc10
children d58d06eafe83
comparison
equal deleted inserted replaced
27342:3a174cb28d36 27343:5fe6a8adf569
54 #endif 54 #endif
55 55
56 #include "input/input.h" 56 #include "input/input.h"
57 #include "input/mouse.h" 57 #include "input/mouse.h"
58 58
59 #ifdef HAVE_NEW_GUI 59 #ifdef CONFIG_GUI
60 #include "gui/interface.h" 60 #include "gui/interface.h"
61 #include "mplayer.h" 61 #include "mplayer.h"
62 #endif 62 #endif
63 63
64 #define WIN_LAYER_ONBOTTOM 2 64 #define WIN_LAYER_ONBOTTOM 2
954 Window vo_window = None; 954 Window vo_window = None;
955 GC vo_gc = NULL; 955 GC vo_gc = NULL;
956 GC f_gc = NULL; 956 GC f_gc = NULL;
957 XSizeHints vo_hint; 957 XSizeHints vo_hint;
958 958
959 #ifdef HAVE_NEW_GUI 959 #ifdef CONFIG_GUI
960 void vo_setwindow(Window w, GC g) 960 void vo_setwindow(Window w, GC g)
961 { 961 {
962 vo_window = w; 962 vo_window = w;
963 vo_gc = g; 963 vo_gc = g;
964 } 964 }
973 if (f_gc) 973 if (f_gc)
974 { 974 {
975 XFreeGC(mDisplay, f_gc); 975 XFreeGC(mDisplay, f_gc);
976 f_gc = NULL; 976 f_gc = NULL;
977 } 977 }
978 #ifdef HAVE_NEW_GUI 978 #ifdef CONFIG_GUI
979 /* destroy window only if it's not controlled by the GUI */ 979 /* destroy window only if it's not controlled by the GUI */
980 if (!use_gui) 980 if (!use_gui)
981 #endif 981 #endif
982 { 982 {
983 if (vo_gc) 983 if (vo_gc)
1029 } 1029 }
1030 1030
1031 while (XPending(mydisplay)) 1031 while (XPending(mydisplay))
1032 { 1032 {
1033 XNextEvent(mydisplay, &Event); 1033 XNextEvent(mydisplay, &Event);
1034 #ifdef HAVE_NEW_GUI 1034 #ifdef CONFIG_GUI
1035 if (use_gui) 1035 if (use_gui)
1036 { 1036 {
1037 guiGetEvent(0, (char *) &Event); 1037 guiGetEvent(0, (char *) &Event);
1038 if (vo_window != Event.xany.window) 1038 if (vo_window != Event.xany.window)
1039 continue; 1039 continue;
1073 break; 1073 break;
1074 case KeyPress: 1074 case KeyPress:
1075 { 1075 {
1076 int key; 1076 int key;
1077 1077
1078 #ifdef HAVE_NEW_GUI 1078 #ifdef CONFIG_GUI
1079 if ( use_gui ) { break; } 1079 if ( use_gui ) { break; }
1080 #endif 1080 #endif
1081 1081
1082 XLookupString(&Event.xkey, buf, sizeof(buf), &keySym, 1082 XLookupString(&Event.xkey, buf, sizeof(buf), &keySym,
1083 &stat); 1083 &stat);
1111 { 1111 {
1112 vo_showcursor(mydisplay, vo_window); 1112 vo_showcursor(mydisplay, vo_window);
1113 mouse_waiting_hide = 1; 1113 mouse_waiting_hide = 1;
1114 mouse_timer = GetTimerMS(); 1114 mouse_timer = GetTimerMS();
1115 } 1115 }
1116 #ifdef HAVE_NEW_GUI 1116 #ifdef CONFIG_GUI
1117 // Ignore mouse button 1-3 under GUI. 1117 // Ignore mouse button 1-3 under GUI.
1118 if (use_gui && (Event.xbutton.button >= 1) 1118 if (use_gui && (Event.xbutton.button >= 1)
1119 && (Event.xbutton.button <= 3)) 1119 && (Event.xbutton.button <= 3))
1120 break; 1120 break;
1121 #endif 1121 #endif
1127 { 1127 {
1128 vo_showcursor(mydisplay, vo_window); 1128 vo_showcursor(mydisplay, vo_window);
1129 mouse_waiting_hide = 1; 1129 mouse_waiting_hide = 1;
1130 mouse_timer = GetTimerMS(); 1130 mouse_timer = GetTimerMS();
1131 } 1131 }
1132 #ifdef HAVE_NEW_GUI 1132 #ifdef CONFIG_GUI
1133 // Ignore mouse button 1-3 under GUI. 1133 // Ignore mouse button 1-3 under GUI.
1134 if (use_gui && (Event.xbutton.button >= 1) 1134 if (use_gui && (Event.xbutton.button >= 1)
1135 && (Event.xbutton.button <= 3)) 1135 && (Event.xbutton.button <= 3))
1136 break; 1136 break;
1137 #endif 1137 #endif
1805 } 1805 }
1806 } 1806 }
1807 1807
1808 void vo_vm_close(Display * dpy) 1808 void vo_vm_close(Display * dpy)
1809 { 1809 {
1810 #ifdef HAVE_NEW_GUI 1810 #ifdef CONFIG_GUI
1811 if (vidmodes != NULL && vo_window != None) 1811 if (vidmodes != NULL && vo_window != None)
1812 #else 1812 #else
1813 if (vidmodes != NULL) 1813 if (vidmodes != NULL)
1814 #endif 1814 #endif
1815 { 1815 {