summaryrefslogtreecommitdiff
path: root/src/main.h
blob: a9fce5a11b20105ac9f80830b99ccf4a1c2569a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/* Copyright (C) 2010-2012 by Cristian Henzel <oss@rspwn.com>
 * Copyright (C) 2011 by Eugene Nikolsky <pluton.od@gmail.com>
 *
 * forked from parcellite, which is
 * Copyright (C) 2007-2008 by Xyhthyx <xyhthyx@gmail.com>
 *
 * This file is part of ClipIt.
 *
 * ClipIt is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * ClipIt is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "preferences.h"

#ifndef MAIN_H
#define MAIN_H

G_BEGIN_DECLS

#define ACTIONS_TAB    2
#define POPUP_DELAY    30

#if GTK_MAJOR_VERSION == 3
#define GTK_DIALOG_NO_SEPARATOR 0
#endif

typedef struct {
  gboolean  use_copy;                 /* Use copy */
  gboolean  use_primary;              /* Use primary */
  gboolean  synchronize;              /* Synchronize copy and primary */
  gboolean  automatic_paste;          /* Automatically paste entry after selecting it */
  gboolean  show_indexes;             /* Show index numbers in history menu */
  gboolean  save_uris;                /* Save URIs in history */
  gboolean  use_rmb_menu;             /* Use Right-Mouse-Button Menu */

  gboolean  save_history;             /* Save history */
  gint      history_limit;            /* Items in history */
  gboolean  history_timeout;          /* Clear history after timeout */
  gint      history_timeout_seconds;  /* Seconds to wait before clearing history */

  gint      items_menu;               /* Items in history menu */
  gboolean  statics_show;             /* Show statics items in history menu */
  gint      statics_items;            /* Static items in history menu */

  gboolean  hyperlinks_only;          /* Hyperlinks only */
  gboolean  confirm_clear;            /* Confirm clear */

  gboolean  single_line;              /* Show in a single line */
  gboolean  reverse_history;          /* Show in reverse order */
  gint      item_length;              /* Length of items */

  gint      ellipsize;                /* Omitting */

  gchar*    history_key;              /* History menu hotkey */
  gchar*    actions_key;              /* Actions menu hotkey */
  gchar*    menu_key;                 /* ClipIt menu hotkey */
  gchar*    search_key;               /* ClipIt search hotkey */
  gchar*    offline_key;              /* ClipIt offline mode hotkey */

  gboolean  no_icon;                  /* No icon */

  gboolean  offline_mode;             /* Offline mode */

  gchar*    exclude_windows;          /* Exclude clipboard content from windows, whose name matches this regexp */
} prefs_t;

extern prefs_t prefs;

void history_hotkey(char *keystring, gpointer user_data);

void actions_hotkey(char *keystring, gpointer user_data);

void menu_hotkey(char *keystring, gpointer user_data);

void search_hotkey(char *keystring, gpointer user_data);

void offline_hotkey(char *keystring, gpointer user_data);

void clear_main_data();

#ifdef HAVE_APPINDICATOR
void create_app_indicator(gint create);
#endif

G_END_DECLS

#endif