A semi pointed at you can be stopped by grabbing the slide and pushing it backwards so the firing pin either will not engage or will not strike the primer.
Is there something similar for a revolver:
If someone were to grab the cylinder of an uncocked revolver, and prevent it from rotating, would it fire?
Yes, it can be done. it's also, as far as I'm concerned, in the last ditch, got nothing left to lose tactical niche.
First, you need to be aware that while you can prevent a semi or a revolver from firing by "tying up" the action, both types will FIRE as soon as the pressure eases.
Different designs are easier or harder to do this with, it all depends on lots of things, the most important basic one is that the bad guys gun has to be within arms reach, and stay that way.
I'm not talking about techniques to disarm your opponent, I'm referring only the mechanically keeping the pistol from firing. Basically, with both a semi and a revolver, you have to grab it in the right place and HOLD it, keeping your grip and enough pressure to keep parts from moving.
Slick metal parts, possibly oily slick metal parts, using mostly only finger strength, with a fairly small contact area between your hand and the gun part you need to keep from moving. And, you need to maintain that grip no matter what the guy holding the gun does, and he's going to me moving it, twisting it, doing everything he can to break your grip WHILE also pulling the trigger.
With a DA revolver, you may get some advantage if you can jam your finger(s) in a cylinder flute, against the frame, to keep the cylinder from being turned. IF the gun doesn't have a fluted cylinder, that possibility is off the table.
And, in order for it to work, you have to know which way the cylinder rotates. Grab it on the "wrong" side, your mechanical leverage to stop the cylinder turning is very low. If you clamp your hand around the cylinder it can be done, but you have to keep enough pressure on the cylinder to prevent it turning, no matter what else happens, or the gun will fire.
NOT an easy thing, no where near as easy as it looks in the movies. Also, be aware that anything that makes the gun or your hand slippery SERIOUSLY reduces your odds of success. Oil, sweat, blood, mud, or anything else that reduces friction makes it more difficult, perhaps impossible.
ALSO, while all this is going on you have to keep your body clear of the muzzle, otherwise a fraction of a second of "slip" could get you shot.
it's actually a better idea to jam some part of your hand between the hammer and the frame, or grab the gun over the hammer its not already cocked. No method is guaranteed, or reliable, so I consider them last ditch tactics.
SOME semi autos can be pushed out of battery, but again, the key here is that they have to be HELD out of battery no matter what else is going on. Lots and lots of variables, most of them fully out of your control.
Take the common tilt barrel semi, pushing on the front of the slide can move it out of battery, so it won't fire. The disconnector will do its job, and if the trigger is pulled, and held, while out of battery, the gun won't fire when it returns to battery, until the trigger is released and pulled again.
MAYBE that's something the bad guy won't realize, maybe not.
If you are facing something other than the usual tilt barrel service pistol type gun, it becomes even MORE difficult. Fixed barrel semis won't go out of battery from pushing on the barrel, the front of the slide c. You would have to grab the slide somewhere else, (again, small surface area and possibly slippery) and HOLD the slide open enough to disconnect the firing mechanism.
NOT an easy thing to do, almost literally needing both hands. There is a very low order possibility that while you and the bad guy are grappling over the gun, you might be able to punch the magazine release button, or even put the safety ON, (assuming the gun has those features and you can get to them) but there is a lot happening in seconds, and I think random chance has as great a possibility as anything you plan to do. Probably more.
I think your odds are better trying to break the bad guys grip on the weapon than stopping the gun from firing by grabbing (and holding) it.