How to make custom template for search results I have developed a custom search module that is working perfectly. Currently I am using the existing "search-results-tpl.php" and "search-result-tpl.php" for showing search results.

But I want to make my own custom template file for showing results and that template file should be inside my custom module directory. In this template I will be able to style my search results however I like.

Any suggestions on this?

Note: I have tried many contributed modules also, but they don't satisfy my requirements, so therefor I have started a custom module. But if you have any better solution, then feel free to point me to any of them.
By using the theme function I have got it working. Here is how it looks like:

/**
 * Implements hook_theme().
 *
 * Create custom theme and template files.
 */
function mymodule_theme() {
  $themes = array(
    'my_search_result' =&gt; array(
      'variables' =&gt; array('result' =&gt; NULL, 'module' =&gt; NULL),
      'file' =&gt; 'mymodule.pages.inc',
      'template' =&gt; 'my-search-result',
    ),
    'my_search_results' =&gt; array(
      'variables' =&gt; array('results' =&gt; NULL, 'module' =&gt; NULL),
      'file' =&gt; 'mymodule.pages.inc',
      'template' =&gt; 'my-search-results',
    ),
  );
  return $themes;
}