* She gazed longingly at the chocolate cake, her stomach rumbling with desire. (This shows a longing for something specific.)
* He looked longingly at the empty swing set, remembering the happy days spent with his children. (This shows a longing for a past experience.)
* The traveler looked longingly at the sunset, wishing he could stay in this beautiful place forever. (This shows a longing for something unattainable.)
* The dog whined longingly at the door, hoping to be let outside to play. (This shows a longing for something simple and immediate.)
* The artist stared longingly at the masterpiece, wishing he could create something so beautiful. (This shows a longing for an ambitious goal.)
Remember that "longingly" implies a deep desire or yearning for something that is absent or out of reach.