is a trivial program using SDL.
The gray area is the empty board. You can select tiles by clicking on them, you can move them using the cursor keys and you can quit the program pressing q.
The program is a very naive approach to such a thing and I didn't understood rendering at all, so you would do a lot of things quite differently. (First of all using an own coordinate system and let SDL do the hard work.)