#![cfg(feature = "bit-ops")]
use windows_api_utils::prelude::*;
fn main() {
println!("=== Bit Operations Feature Demo ===");
let value = 0x12345678;
println!("Value: 0x{:08X}", value);
println!("LOWORD: 0x{:04X}", loword(value));
println!("HIWORD: 0x{:04X}", hiword(value));
let lhw = LowHighWord::new(value);
println!("LowHighWord: {}", lhw);
let coord_value = 0xFF38FF9C;
let x = LowHighWord::new(coord_value).loword_signed();
let y = LowHighWord::new(coord_value).hiword_signed();
println!("Coordinates: x={}, y={}", x, y);
let test_value = 0b1010_1100;
println!("Bit operations on 0b{:08b}:", test_value);
println!(" Bit 3 set: {}", BitUtils::is_bit_set(test_value, 3));
println!(" Set bit 0: 0b{:08b}", BitUtils::set_bit(test_value, 0));
}