I would recommend looking at open source mining software that supports X11 or software you can bake X11 support into, however as X11 is now ASIC based writing software to mine X11 on a CPU or GPU wouldn't be worth the time unless for a hobby. If you are writing code for mining hardware (ASIC)...