S-A was pressured economically and diplomatically, but no foreign power and the ANC didn't fire a shot to get them to "give up".
H-K was ceded to China because parts of it was already on lease for 100 years and the lease was running out. They could have held it anyway, but they weren't comfortable with the illegality of it. As far as is known, no threats were made by the Chinese.
Macau was ceded (under negotiated terms) because Portugal stopped being a dictatorship and they wanted to get rid of all their foreign possessions and stop being an empire. That's how Mozambique and Angola ultimately gained independence.
History, brehs.