Category theory without codomains? A surjection is a function whose range equals its codomain. Thus, the distinction between functions and surjections requires the notion of a codomain. Similarly, a bijection is an injection whose range equals its codomain. So this distinction, too, requires the notion of a codomain.
However, codomains seem like a very artificial idea, to myself and many others; and so we avoid using them. Thus, we speak of functions $f:X \rightarrow Y$ and functions $f: X \twoheadrightarrow Y$, the latter being a substitute for the notion of a surjection. And we speak of injections $f:X \rightarrow Y$ and injections $f:X \twoheadrightarrow Y$, the latter being a substitute for the notion of a bijection.
That's all well and good, but there's a tension here lurking beneath the surface. The source of the tension is category theory, which stipulates that morphisms have not only domains but also codomains. So unless we can reformulate category theory without codomains, we're sort of trapped.
Has anyone managed to do this?
If not, here's my very preliminary attempt at doing so. A category* will consist of the following data: a class of objects, a class of isomorphisms (not homomorphisms), each of which has a unique domain and range; an operation that composes isomorphisms; and two partial order relations defined on the class of objects, namely the relation "is a subobject of" and "is a quotient object of".
So for example, the statement "$f$ is monomorphism $X \rightarrow Y$" would be interpreted as "There exists a subobject of $Y$, call it $B$, such that $f$ is an isomorphism with domain $X$ and range $B$." And the statement "$f$ is a morphism $X \twoheadrightarrow Y$" would be interpreted as "There exists a quotient object of $X$, call it $A$, such that $f$ is an isomorphism with domain $A$ and range $Y$."
Anyway, I'd be interested in hearing people's opinion on the matter.
EDIT. Just to clarify, this approach would appeal to people whom prefer to define functions (etc.) as their graph, rather than as a triple.
 A: Category theory can be formulated entirely without any objects, so that your idea of getting rid of codomains can be realized with an added bonus that you can also get rid of domains. Objects in category theory, formally, are auxiliary notions. Their only purpose in life is to serve as domains and codomains of arrows, but it is the arrows that are important, and nothing else.
A formal way of getting rid of objects is to define a category to be a class of arrows, together with a partial binary operation on the class of arrows. That partial binary operation is called composition. After defining some of the most elementary properties one expects of this composition partial operation, one can 'recover' objects by identifying certain special arrows that behave like identities. So the slogan is: in a category objects can be identified with identity arrows, and thus be disposed of. 
A more detailed account can be found in Mac Lane's Categories for the Working Mathematician. A related question, is Category Theory with and without Objects.
That said, there is little to gain (at least conceptually) from disposing of objects (there is something to gain logically since it is easier to describe the first order theory of categories in an object-free manner). Your objection to using objects (codomains specifically) is understandable but your solution seems to introduce a lot of complications and is (pardon my opinion here) far from elegant. The use of domains and codomains really has no adverse consequences. What is so horrible in distinguishing between functions and surjections? do you really want every function to be surjective by working out its image explicitly? If so, then here is a little exercise: Find the codomain of the function $f:[0,1]\to D$ where $f(x)=\sin(x)\cos(x)e^x*1/(1+\sin(x))*\ln(|\sin(x)|+|\cos(x)|)$. I hope you will agree it's a lot easier to simply say: the codomain of $f$ is $\mathbb{R}$ and call it a day. 
Later addition incorporating comments and chat information: A situation where functions do not have specified domains or codomains can be incorporated within category theory as follows. Let $Par$ be the category of sets and partial functions. Fix some universal set $U$ in $Par$, then the full subcategory of $Par$ spanned by $U$ can be interpreted as a world where functions can always be composed (albeit sometimes their composition is the empty function). 
A: I agree with Zhen's assessment in the comments that if you think maps should always be surjective you have not done enough mathematics. To be blunt, I can think of so many reasons that maps should not always be surjective that I am having trouble organizing all of my thoughts on this question, so I'm just going to blurt things out (as it were). 
First, here are some objections to your specific proposal.


*

*You are implicitly assuming some kind of factorization of morphisms into epimorphisms and monomorphisms. As I pointed out recently, such factorizations neither exist nor are unique in general categories.

*"Subobject" and "quotient object" are not relations. A given object can be a subobject resp. a quotient object of another object in different ways given by different isomorphism classes of monomorphisms resp. epimorphisms. This isn't a particularly esoteric claim; it already happens in the category of sets for quotient objects. 
Here are some general objections to what you are trying to do, in no particular order. 


*

*There are issues here that I don't know a standard language for talking about, so for lack of a better word I'm going to call them "decidability issues." Sometimes it takes a lot of effort to construct a map. After you've constructed it, sometimes it takes a lot of effort to decide whether it's injective or surjective. Maybe it is, maybe it isn't. Before you've determined this, what are you going to call what you've constructed? 

*Codomains are not an artificial idea at all once you move past thinking of categories of sets and functions and onto more interesting kinds of categories. For example, there are "physical categories" where objects are states of a system and morphisms are ways of transitioning from one state to another. There are "logical categories" where objects are propositions and states are proofs of one proposition from another. There are "cobordism categories" where objects are manifolds and morphisms are ways of connecting those manifolds together using manifolds of one dimension higher. And so forth. 

*There are general machines (that is, functors) for turning morphisms into other morphisms, and these machines do not preserve epimorphisms in general. This is a general version of the specific point brought up by Mac Lane via Zhen in the comments. 

*In general, in mathematics we often don't study specific examples of something, but instead study families of examples. For example, we often don't study numbers, but families of numbers (e.g. sequences). In category theory, we often don't study morphisms, but families of morphisms, in particular the family of all morphisms from an object $x$ to an object $y$. It is sensible to group all of these morphisms together even though some of them may not be epimorphisms, and this grouping has good formal properties. 
A: I would rather do something like: consider all functions, 
then we can define the composition of any two of them (if you want to keep the domains, then the domain of $f\circ g$ will consist of course of those elements $x$ such that $g(x)\in Dom f$).
So, it would result in a semigroup of the functions, instead of a category, probably the empty function and the (partial) identities would be of special use.
An interesting consequence is that this semigroup would have a unit element only if the total set (the 'set' of all sets) existed..

If, in addition, we presume the partial order of these codomainless functions (meaning $f\subseteq g$ iff $\ \exists f(x)\Rightarrow g(x)=f(x)$), then the (identities of the) objects can be recovered as the 'local units': those $e$ functions which satisfy $e\circ f\subseteq f$ and $f\circ e\subseteq f$ for all functions $f$. [If $e$ is not an identity, then there is $x: e(x)\ne x$, then we need an arbitrary $f$ which maps different values to $e(x)$ and $x$.]
A: I strongly believe that the idea you are trying to express is better described as "all functions implicitly have the same codomain — the entire universe of discourse", together with the additional stipulation "every set comes with a canonical embedding in the universe".
I think you would get better results not by trying to rewrite category theory, but instead trying to express these ideas in terms consistent with category theory.
There is a convenient expression of this idea (but I don't recall where I've seen it before). What you want is:


*

*A category $\mathcal{C}$

*A subcategory $\mathcal{P} \subseteq \mathcal{C}$ that is both:


*

*A wide subcategory (i.e. it includes every object)

*A preorder (i.e. between any two objects there is at most one arrow)



The idea here is that $\mathcal{P}$ expresses the choice in how all of the different objects should be embedded in one another. For example, using this to encode a material set theory such as ZFC, one would take $\mathcal{C}$ to be the category of sets and functions (in the usual category-theoretic way), and take $\mathcal{P}$ to be the subcategory functions that are ZFC-theoretic inclusions.
One of the features of having $\mathcal{P}$ is that it allows for a canonical choice of implicit conversions in the same spirit as material set theory. For the purposes of the OP, one such application is to allow implicitly changing the codomain of an arrow.
Explicitly, given an arrow $f : X \to Y$, in any context where we expect an arrow $X \to Z$:


*

*We can use $f$ to mean the arrow $if$, assuming $\mathcal{P}$ contain an arrow $i : Y \to Z$

*We can use $f$ to mean the arrow $f'$, assuming $\mathcal{P}$ contain an arrow $i : Z \to Y$ such that we can factor $f = if'$


You probably want $\mathcal{P}$ to have some additional nice properties to make things better behaved; e.g. you probably want all of the arrows of $\mathcal{P}$ to be monic in $\mathcal{C}$, and maybe you want every pair of objects to have a common over-object (i.e. for every $X,Y$, there is some $Z$ with $X \leq Z$ and $Y \leq Z$).

As I'm writing this, I recall that in Categories, Allegories, Freyd and Scedrov describe a way to present a category in terms of objects and proto-morphisms. See this nLab entry
The arrows of a category presented this way are viewed as instances of "the protomorphism $f$ can be construed as going from $X$ to $Y$". They actually define the graphical notation "$X \xrightarrow{f} Y$" to mean precisely that relation.
(it's more common, however, to just say the arrows are triples $(X, f, Y)$)
The point of bringing this up is that their description explicitly adds this compatibility layer.  You have a different conception of what functions should be — you should view the arrows of the category not as being functions, but instead as ways of construing a function as a mapping between objects.
