This Ph.D. thesis presents methods for enhancing the optical functionality of transparent glass panes by introduction of invisible nanoscale surface structures, such as gratings and planar photonic cyrstals. In this way the primary functionality of the glass - transparancy - may be enhanced with new properties, turning window glasses or glass surfaces of hand-held electronics into multifunctional devices. Common to all examples discussed, gratings and photonic crystals are used to engineer the optical dispersion and selectively modify the direction of guided light and transfer free-space light into guided modes and vice-versa. This is done in a way such that the interaction of guided light inside the glass and transmitted light through the glass i minimized. The relevant physical background for these processes is discussed and four practical devices which demonstrate the principle have been designed, fabricated and analyzed. First a solar harvesting method, based on nanoscale gratings which are imprinted in a thin-film which is deposited on the window pane is discussed. Free-space light which is incident onto a window is coupled to guided modes in the thin-film or the substrate and guided towards the edge, while transparency of the glass is preserved. Solar cells could be attached to the edges to generate electricity. More complex structures than single-period gratings are investigated in gratings used for daylighting, i.e. optimizing the way how natural sunlight is transmitted through windows into the room. It is shown that gratings with disorder introduced to the period effectively modify the diffraction characteristics from distinct sharp and wavelength dependent orders into a broad distributions over large angular range and with sufficient mixing such that color effects are minimized, thus allowing a homogeneous, glare-free, white-light daylighting into the room. Even more functionality can be achieved when the optical effects are tunable or reconfigurable. This is investigated with photonic crystal dye lasers. These lasers combine a photonic crystal resonator with a dye-doped liquid crystal gain medium for the realization of cheap and compact optically pumped, electrically tunable lasers. Finally, a transparent projection display is presented which uses sub-wavelength gratings for redirection of light guided inside a waveguide and facilitates electro-optic switching by means of liquid crystals. The study presents a working proof-of-principle for a transparent projection display and furthermore allows for a detailed study of the interaction between guided light and the voltage-dependent molecular alignment of liquid crystal molecules. The influence of TE/TM polarization is investigated and switching times and driving voltages are competitive with existing non-projection liquid crystal displays. The principle has been investigated for use in projection displays but may also be applied to other applications such as cell manipulation in lab-on-a-chip systems and reconfigurable optical switches in multilayer photonic circuits and optical interconnects.