  We prove a generalisation of the correspondence, due to Resende and
Lawson--Lenz, between \'etale groupoids---which are topological groupoids whose
source map is a local homeomorphisms---and complete pseudogroups---which are
inverse monoids equipped with a particularly nice representation on a
topological space.
  Our generalisation improves on the existing functorial correspondence in four
ways. Firstly, we enlarge the classes of maps appearing to each side. Secondly,
we generalise on one side from inverse monoids to inverse categories, and on
the other side, from \'etale groupoids to what we call partite \'etale
groupoids. Thirdly, we generalise from \'etale groupoids to source-\'etale
categories, and on the other side, from inverse monoids to restriction monoids.
Fourthly, and most far-reachingly, we generalise from topological \'etale
groupoids to \'etale groupoids internal to any join restriction category C with
local glueings; and on the other side, from complete pseudogroups to ``complete
C-pseudogroups'', i.e., inverse monoids with a nice representation on an object
of C. Taken together, our results yield an equivalence, for a join restriction
category C with local glueings, between join restriction categories with a
well-behaved functor to C, and partite source-\'etale internal categories in C.
In fact, we obtain this by cutting down a larger adjunction between arbitrary
restriction categories over C, and partite internal categories in C.
  Beyond proving this main result, numerous applications are given, which
reconstruct and extend existing correspondences in the literature, and provide
general formulations of completion processes.
