[AD] set_window_close_*

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I just realized that set_window_close_button() returns a value, so it's not a 
good idea to define it as an empty macro. Therefore the attached patch turns 
the two macros into inline functions instead.

Commited.

-- 
Eric Botcazou
--- /home/eric/cvs/allegro/include/allegro/alcompat.h	Thu Nov 28 19:06:52 2002
+++ allegro/include/allegro/alcompat.h	Fri Dec  6 18:57:22 2002
@@ -78,7 +78,7 @@
 #define KB_NORMAL       1
 #define KB_EXTENDED     2
 
-#define SEND_MESSAGE        object_message
+#define SEND_MESSAGE    object_message
 
 #define cpu_fpu         (cpu_capabilities & CPU_FPU)
 #define cpu_mmx         (cpu_capabilities & CPU_MMX)
@@ -195,8 +195,15 @@
 
 
 /* the old close button functions */
-#define set_window_close_button(enable)
-#define set_window_close_hook(callback)  set_close_button_callback(callback)  
+AL_INLINE(int, set_window_close_button, (int enable),
+{
+   return 0;
+})
+
+AL_INLINE(void, set_window_close_hook, (void (*proc)(void)),
+{
+   set_close_button_callback(proc);
+})
 
 
 #ifdef __cplusplus
@@ -205,4 +212,3 @@
 
 #endif          /* ifndef ALLEGRO_COMPAT_H */
 
-


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/