Repository: jeaye/ncurses-rs (language: rust)

Issue:
Mouse event macros are not exported
The macros for extracting mouse events (`button_release`, `button_press` `button_click`, etc.)
are not tagged with `#[macro_export]`, meaning that they are unusable outside the crate. They are currently unused within the crate, so they are causing warnings. They should either be removed or exported.


Discussion / hints:

Fix patch:
diff --git a/src/constants.rs b/src/constants.rs
index a73f1554..8e4b78e6 100644
--- a/src/constants.rs
+++ b/src/constants.rs
@@ -277,14 +277,6 @@ pub const REPORT_MOUSE_POSITION: i32 = ncurses_mouse_mask!(MODIFIER_SHIFT, 0x008
 
 pub const ALL_MOUSE_EVENTS: i32=       REPORT_MOUSE_POSITION - 1;
 
-/* macros to extract single event-bits from masks */
-macro_rules! button_release( ($e: expr, $x: expr) => (e & ncurses_mouse_mask!(x, 0x001)); );
-macro_rules! button_press( ($e: expr, $x: expr) => (e & ncurses_mouse_mask!(x, 0x002)); );
-macro_rules! button_click( ($e: expr, $x: expr) => (e & ncurses_mouse_mask!(x, 0x004)); );
-macro_rules! button_double_click( ($e: expr, $x: expr) => (e & ncurses_mouse_mask!(x, 0x008)); );
-macro_rules! button_triple_click( ($e: expr, $x: expr) => (e & ncurses_mouse_mask!(x, 0x010)); );
-macro_rules! button_reserved_event( ($e: expr, $x: expr) => (e & ncurses_mouse_mask!(x, 0x020)); );
-
 /* locales */
 pub const LC_ALL: c_int = 0;
 pub const LC_COLLATE: c_int = 1;


Test patch: