LOS ANGELES — With an eye toward the mainstream success of gay-themed films like “Philadelphia,” 20th Century Fox has secured the rights to make a movie about the Supreme Court case that effectively legalized same-sex marriage.

Fox said Tuesday that it had bought the life rights of Jim Obergefell, the lead plaintiff in a lawsuit that last month resulted in recognition of the right to same-sex marriage in the United States. His lawyer, Al Gerhardstein, sold his life rights as well.

Additionally, the studio has secured screen rights to a still-unwritten book by Mr. Obergefell and the journalist Debbie Cenziper. A proposal for the book, to be titled “21 Years to Midnight,” has been submitted to publishers, with a deal expected as soon as this week.