This is the first of three papers which develop various fundamental aspects of the theory of ditopological texture spaces in a categorical setting and present important links with the theory of L-topological spaces. The authors begin by defining the notion of q-sets, which together with the p-sets considered earlier, enable the formulation of a powerful concept of duality. This plays an important role in the theory of direlations and difunctions, which is described here in detail. Difunctions are then taken as the morphisms of a category dfTex, whose objects are texture spaces. Several important subcategories are defined and the closely related construct fTex defined. Some properties of the functors between these categories are obtained. (C) 2004 Elsevier B.V. All rights reserved.