Whole house alarm systems typically include door and window sensors which detect whether they are closed. The standard device uses a two-piece sensor; a magnet mounts in the movable portion and the a wired sensor that mounts in the frame. When the door or window is closed the magnet aligns with the sensor in the frame and no alarm is sounded. When opened, the magnet no longer aligns with the sensor and a signal is sent to the alarm controller.
A variety of styles are available for door and window sensors. The old style mounted along the interior side of door and though small, was still fairly visible. New styles can be mounted into holes drilled into the two halves of a door and it's frame, making them virtually invisible. Other features include sensors that can tolerate a large gap between the halves, tamper resistant, and even explosion resistant models are available.