commands.c 1.39 KB
Newer Older
Moritz Lipp's avatar
Moritz Lipp committed
1 2 3
/* See LICENSE file for license and copyright information */

#include "commands.h"
Moritz Lipp's avatar
Moritz Lipp committed
4
#include "zathura.h"
5
#include "print.h"
Moritz Lipp's avatar
Moritz Lipp committed
6 7

bool
Moritz Lipp's avatar
Moritz Lipp committed
8
cmd_bookmark_create(girara_session_t* session, girara_list_t* argument_list)
Moritz Lipp's avatar
Moritz Lipp committed
9 10 11 12 13
{
  return true;
}

bool
Moritz Lipp's avatar
Moritz Lipp committed
14
cmd_bookmark_delete(girara_session_t* session, girara_list_t* argument_list)
Moritz Lipp's avatar
Moritz Lipp committed
15 16 17 18 19
{
  return true;
}

bool
Moritz Lipp's avatar
Moritz Lipp committed
20
cmd_bookmark_open(girara_session_t* session, girara_list_t* argument_list)
Moritz Lipp's avatar
Moritz Lipp committed
21 22 23 24 25
{
  return true;
}

bool
Moritz Lipp's avatar
Moritz Lipp committed
26
cmd_close(girara_session_t* session, girara_list_t* argument_list)
Moritz Lipp's avatar
Moritz Lipp committed
27
{
28 29 30 31 32 33
  g_return_val_if_fail(session != NULL, false);
  g_return_val_if_fail(session->global.data != NULL, false);
  zathura_t* zathura = session->global.data;
  g_return_val_if_fail(zathura->document != NULL, false);

  document_close(zathura);
Moritz Lipp's avatar
Moritz Lipp committed
34

Moritz Lipp's avatar
Moritz Lipp committed
35 36 37 38
  return true;
}

bool
Moritz Lipp's avatar
Moritz Lipp committed
39
cmd_info(girara_session_t* session, girara_list_t* argument_list)
Moritz Lipp's avatar
Moritz Lipp committed
40 41 42 43
{
  return true;
}

44 45 46 47 48 49
bool
cmd_open(girara_session_t* session, girara_list_t* argument_list)
{
  return true;
}

Moritz Lipp's avatar
Moritz Lipp committed
50
bool
Moritz Lipp's avatar
Moritz Lipp committed
51
cmd_print(girara_session_t* session, girara_list_t* argument_list)
Moritz Lipp's avatar
Moritz Lipp committed
52
{
53 54 55 56 57 58 59 60 61 62 63
  g_return_val_if_fail(session != NULL, false);
  g_return_val_if_fail(session->global.data != NULL, false);
  zathura_t* zathura = session->global.data;

	if (zathura->document == NULL) {
		girara_error("no document as been opened");
		return false;
	}

	print((zathura_t*) session->global.data);;

Moritz Lipp's avatar
Moritz Lipp committed
64 65 66 67
  return true;
}

bool
Moritz Lipp's avatar
Moritz Lipp committed
68
cmd_save(girara_session_t* session, girara_list_t* argument_list)
Moritz Lipp's avatar
Moritz Lipp committed
69 70 71
{
  return true;
}