user9273: I've got a simple question, that I'm having difficulty finding an answer for...
If it is possible to castle (I know the conditions for it), and I decide to move the king to the square where it would end up in castling, do I have to "take the castling", i.e. move the rook too?

user12873: Yes, moving both the king and the rook are necessary to castle.

user19877: Yes, but one additional point: If you have started to place the king on g1, for example, but you change your mind AND you have not taken your hand off it, you can still move it one square to another square as long as you have not also touched the rook. 

user394: I know this is a late answer to a question that got bumped, but there are a couple of  essential points to add to @BlindKungFuMaster's answer:

There can be no pieces on the squares in between the king and the castling rook (So knight/bishop on the kingside, and knight/bishop/queen on the queenside).
It must be the first move for both pieces involved - So if you want to castle to the kingside, and either the rook on H1 or the king has moved off of their square and then back, you cannot castle to that side. If the king has not moved, but the rook on H1 has, and the rook on A1 has not, then you can still castle queenside.*

*- Note: Square reference assumes castling as White.

user8844: This is a very good question indeed but it took me a long time to understand what you wanted.
So you are programming an interface and you wonder how the computer can tell if a player wants to play Kg1 or 0-0 taking short castle as an example. The answer is that if both moves are legal then none of them takes precedence and the player can play whichever they desire. You then need a device how the player can make their intention clear to the computer. For instance dragging their king outside the board could do the castling. 
As BlindKungFuMaster explains in standard chess you do not have to worry about it since the King has to be on e1 for a castle to be a legal move. Then there is no other legal move that could take the King on g1 thus there is no ambiguity. 
In Fisher Chess (chess 960) however you can have an initial position with the King on f1 and a Rook on h1. In this case both Kf1-g1 and 0-0 would be legal moves. Even for over the board play the Laws (Appendix F) recommend a special procedure for castling to avoid misunderstanding.

user4362: Yes. 
Otherwise this would be an illegal move because during castling the king moves two squares, but apart from castling it is only allowed to move one square.

9273: <p>I've got a simple question, that I'm having difficulty finding an answer for...</p>

<p>If it is possible to castle (I know the conditions for it), and I decide to move the king to the square where it would end up in castling, do I have to "take the castling", i.e. move the rook too?</p>
 12873: <p>Yes, moving both the king and the rook are necessary to castle.</p>
 19877: <p>Yes, but one additional point: If you have started to place the king on g1, for example, but you change your mind AND you have not taken your hand off it, you can still move it one square to another square as long as you have not also touched the rook. </p>
 394: <p>I know this is a late answer to a question that got bumped, but there are a couple of  essential points to add to @BlindKungFuMaster's answer:</p>

<ol>
<li>There can be no pieces on the squares in between the king and the castling rook (So knight/bishop on the kingside, and knight/bishop/queen on the queenside).</li>
<li>It must be the first move for both pieces involved - So if you want to castle to the kingside, and either the rook on H1 or the king has moved off of their square and then back, you cannot castle to that side. If the king has not moved, but the rook on H1 has, and the rook on A1 has not, then you can still castle queenside.*</li>
</ol>

<p>*- Note: Square reference assumes castling as White.</p>
 8844: <p>This is a very good question indeed but it took me a long time to understand what you wanted.</p>

<p>So you are programming an interface and you wonder how the computer can tell if a player wants to play <code>Kg1</code> or <code>0-0</code> taking short castle as an example. The answer is that if both moves are legal then none of them takes precedence and the player can play whichever they desire. You then need a device how the player can make their intention clear to the computer. For instance dragging their king outside the board could do the castling. </p>

<p>As BlindKungFuMaster explains in standard chess you do not have to worry about it since the King has to be on <code>e1</code> for a castle to be a legal move. Then there is no other legal move that could take the King on <code>g1</code> thus there is no ambiguity. </p>

<p>In <em>Fisher Chess (chess 960)</em> however you can have an initial position with the King on <code>f1</code> and a Rook on <code>h1</code>. In this case both <code>Kf1-g1</code> and <code>0-0</code> would be legal moves. Even for over the board play the <a href="http://www.fide.com/component/handbook/?id=171&amp;view=article0" rel="noreferrer">Laws</a> (Appendix F) recommend a special procedure for castling to avoid misunderstanding.</p>
 4362: <p>Yes. </p>

<p>Otherwise this would be an illegal move because during castling the king moves two squares, but apart from castling it is only allowed to move one square.</p>
