BARCELONA, Spain — These days much of the action in the world of gadgets is happening in smartphones — like their sophisticated design and the apps that run on them. That has left desktop and laptop computers looking a little dull in comparison.

So computers are suddenly getting more phonelike.

Microsoft and Apple are leading the charge in this area. On Wednesday, Microsoft took the wraps off its latest operating system for computers and tablets, Windows 8, which mimics the look and feel of the company’s new software for phones. And Apple recently offered a preview of its next operating system for Macs, incorporating familiar elements from the iPhone and iPad.

“All of the major innovation for PCs is coming from the mobile phone,” said Tim Coulling, an analyst at the research firm Canalys.

The companies hope this strategy will give them added leverage in the market for tablets and smartphones, which is growing to rival the market for personal computers. And it could also help them sell more computers or, in Microsoft’s case, software for computers.