1. Combine the flour, rosemary and salt in a large bowl. Add the olive oil and butter and mix together by hand until the dough has the consistency of wet sand. Add the wine and mix together. If the dough is too dry and does not come together, add a little water.
2. Knead the dough by hand inside the bowl for a few minutes until it comes together as a ball. Cover with plastic and refrigerate for at least 30 minutes, or overnight.
3. For the topping, heat the olive oil in a very large sauté pan and cook the onions, thyme, salt and pepper over low heat, stirring occasionally. After 30 minutes, stir in garlic. Sauté for another 15 minutes, until the onions are sweet and cooked but not browned.
4. Preheat oven to 350°F. Transfer the tart dough to a 12-inch circular tart form. Flour your hands and gently press the dough into the form. Spread the onion mixture over the base of the crust. Bake until the crust is golden brown, 40 to 45 minutes.