summaryrefslogtreecommitdiff
path: root/src/ephy-location-entry.h
blob: 0071569f007b022943098b8c0a7e169d49b5729b (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
98
99
100
101
102
103
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
 *  Copyright © 2002  Ricardo Fernández Pascual
 *  Copyright © 2003, 2004  Marco Pesenti Gritti
 *  Copyright © 2003, 2004, 2005  Christian Persch
 *  Copyright © 2016  Igalia S.L.
 *
 *  This file is part of Epiphany.
 *
 *  Epiphany 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.
 *
 *  Epiphany 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 Epiphany.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include <gtk/gtk.h>

#include "ephy-adaptive-mode.h"
#include "ephy-bookmark-states.h"
#include "ephy-password-popover.h"
#include "ephy-permission-popover.h"
#include "ephy-security-levels.h"

G_BEGIN_DECLS

#define EPHY_TYPE_LOCATION_ENTRY (ephy_location_entry_get_type())

G_DECLARE_FINAL_TYPE (EphyLocationEntry, ephy_location_entry, EPHY, LOCATION_ENTRY, GtkWidget)


GtkWidget      *ephy_location_entry_new                        (void);

gboolean        ephy_location_entry_get_can_undo               (EphyLocationEntry *entry);

gboolean        ephy_location_entry_get_can_redo               (EphyLocationEntry *entry);

gboolean        ephy_location_entry_reset                      (EphyLocationEntry *entry);

void            ephy_location_entry_undo_reset                 (EphyLocationEntry *entry);

void            ephy_location_entry_grab_focus                 (EphyLocationEntry *entry);

void            ephy_location_entry_set_bookmark_icon_state    (EphyLocationEntry     *entry,
                                                                EphyBookmarkIconState  state);

void            ephy_location_entry_set_lock_tooltip           (EphyLocationEntry *entry,
                                                                const char        *tooltip);

void            ephy_location_entry_set_password_popover       (EphyLocationEntry   *entry,
                                                                EphyPasswordPopover *popover);

void            ephy_location_entry_show_password_popover      (EphyLocationEntry *entry);

void            ephy_location_entry_add_permission_popover     (EphyLocationEntry     *entry,
                                                                EphyPermissionPopover *popover);

void            ephy_location_entry_show_best_permission_popover (EphyLocationEntry *entry);

void            ephy_location_entry_clear_permission_buttons   (EphyLocationEntry *entry);

void            ephy_location_entry_set_add_bookmark_popover   (EphyLocationEntry *entry,
                                                                GtkPopover        *popover);

void            ephy_location_entry_show_add_bookmark_popover  (EphyLocationEntry *entry);

void            ephy_location_entry_set_reader_mode_visible    (EphyLocationEntry *entry,
                                                                gboolean           visible);

void            ephy_location_entry_set_reader_mode_state      (EphyLocationEntry *entry,
                                                                gboolean           active);

gboolean        ephy_location_entry_get_reader_mode_state      (EphyLocationEntry *entry);

void            ephy_location_entry_set_progress               (EphyLocationEntry *entry,
                                                                gdouble            progress,
                                                                gboolean           loading);
void            ephy_location_entry_page_action_add            (EphyLocationEntry *entry,
                                                                GtkWidget         *action);
void            ephy_location_entry_page_action_remove         (EphyLocationEntry *entry,
                                                                GtkWidget         *action);

void            ephy_location_entry_page_action_clear          (EphyLocationEntry *entry);

void            ephy_location_entry_set_adaptive_mode          (EphyLocationEntry *entry,
                                                                EphyAdaptiveMode   adaptive_mode);

void            ephy_location_entry_grab_focus_without_selecting (EphyLocationEntry *entry);

GListModel     *ephy_location_entry_get_model                  (EphyLocationEntry *entry);
void            ephy_location_entry_set_model                  (EphyLocationEntry *entry,
                                                                GListModel        *model);

G_END_DECLS