I'd like to write my own widget that display wireless signal strength.
nm-applet displays the strength on its icon (here it's between zero and four bars, but I believe that's dependant on the GTK theme). Where does it get its data from?
It'll be getting it from the same place as iwconfig:
See the Link Quality and Signal level line?
If you want to do it lower level than calling iwconfig and parsing the output then I suggest you look at the source code to iwconfig.