Here is how to do it in Windows:
SendMessageA QueryGadget(Gadget_SurfaceMaterial,QUERY_HWND),EM_SETREADONLY,1,0
Maybe GADGET_READONLY would be an appropriate replacement, leaving the old TEXTAREA_READONLY constant as well?
SendMessageA QueryGadget(Gadget_SurfaceMaterial,QUERY_HWND),EM_SETREADONLY,1,0
Maybe GADGET_READONLY would be an appropriate replacement, leaving the old TEXTAREA_READONLY constant as well?