WATCH: 'Moonlight,' Affleck, Stone Take Top Oscars

All the stars came out Sunday night for the 89th Academy Awards. Watch a round up of all the top Oscar winners. (Published Monday, Feb. 27, 2017)

President Donald Trump was on people's minds — if not on everyone's lips — at the Oscars on Sunday night.

He was the subject of a protest non-appearance by an Academy Award-winning director, an oblique introduction by last year's supporting actor winner and several of host Jimmy Kimmel's jokes. But the president's name was kept out of most of references.

Iranian filmmaker Asghar Farhadi, winner of the Oscar for best foreign film, boycotted Sunday's ceremony, citing Trump's travel ban of several predominantly Muslim countries, including his own. He sent Iranian astronaut Anousheh Ansari to read a statement for him.

"Dividing the world into the 'us and our enemies' categories creates fear," Ansari said, adding it's "a deceitful justification for aggression and war."

All six directors nominated in the category issued a statement two days before the ceremony criticizing the "climate of fascism" in the U.S.

Kimmel referred to Trump specifically in a joke that brought in the Academy Awards' past controversy over a lack of diversity in nominees. "Remember last year when people were saying the Oscars were racist?" he said.

He made an elaborate show of talking about the "overrated" Meryl Streep, who was given that tag by the president in a tweet after she criticized him in a speech at the Golden Globes last month. Kimmel joked about her dress, saying "by the way, is that an Ivanka?"

And Kimmel also alluded to White House Press Secretary Sean Spicer's banning of some reporters from a briefing on Friday, saying that reporters from CNN, the New York Times, the Los Angeles Times and others needed to leave.

As he introduced the nominees for the best supporting actress award, last year's supporting actor winner Mark Rylance said there should be an award for people who can oppose things without hatred. Trump wasn't named, but the context seemed clear.

Kimmel said about audience members, "some of you will get to come up on stage here and give a speech that the president of the United States will tweet about in all caps during his 5 a.m. bowel movement."

Marlon Brando's decision to send American Indian Sacheen Littlefeather to accept his best actor award in 1973 essentially began the modern marriage of Oscar and politics. But it was still so unusual that when documentary producer Bert Schneider talked about the Vietnam War two years later, Frank Sinatra later read an apology on-air.

Since then an Oscars podium has been used several times for political causes: Vanessa Redgrave on behalf of Palestinians in 1978, Michael Moore to denounce President George W. Bush in 2003, Sean Penn to boost gay marriage in 2009, Patricia Arquette to advocate for equal pay for women in 2015 and Leonardo DiCaprio to talk about climate change last year.

If Trump is watching, only Twitter may tell. Asked last week whether the president plans to tune in, White House Press Secretary Sean Spicer said he didn't know. But since there's a governor's ball on Sunday, "I have a feeling that's where the president and the first lady are going to be focused on on Sunday night," he said.

Something that did draw Trump's attention was the announcement that the New York Times would run an advertisement during the ceremony. The president tweeted Sunday that the Times was trying to "save its failing reputation." He encouraged the Times to "try reporting accurately & fairly" in a tweet that had its own inaccuracy: it's not the first time, as Trump had tweeted, that the Times has advertised its wares.