In order to hang curtain road outside of the window frame, I need to put a piece of wood same width as window trim in place for a level surface to screw in the rod bracket. How will I attach the piece of wood to the painted drywall since there is no stud there? Can I glue it? No way to hold wood in place until it dries. After wood is attached to make the surface level, how best to attach rod brackets? If glue is possible, would prefer that, but what type/brand would do the best job?
No, not glue anywhere...ruins future removal. Toggle Bolts (a.k.a. Mushroom Head or Molly Bolts), are your strongest option and very simple to use. Drill a hole the size of the folded head, insert and tighten while pulling the unfolded head against the back of the wall.
The length of the Toggle Bolt should be at least 1-inch longer than the depth of the drywall/plaster and blocking, so the head can be inserted far enough in so it can pop open. They can't be re-used once fully removed, but are very sturdy and can be re-tightened, if ever needed.