NetSurf
con_secure.c
Go to the documentation of this file.
1/*
2 * Copyright 2006 Richard Wilson <info@tinct.net>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include <stdbool.h>
20
21#include "utils/nsoption.h"
22#include "utils/messages.h"
23
24#include "riscos/gui.h"
25#include "riscos/wimp.h"
26#include "riscos/wimp_event.h"
27#include "riscos/configure.h"
29#include "riscos/dialog.h"
30
31#define SECURITY_REFERRER 2
32#define SECURITY_DURATION_FIELD 6
33#define SECURITY_DURATION_INC 7
34#define SECURITY_DURATION_DEC 8
35#define SECURITY_DEFAULT_BUTTON 10
36#define SECURITY_CANCEL_BUTTON 11
37#define SECURITY_OK_BUTTON 12
38
39static void ro_gui_options_security_default(wimp_pointer *pointer);
40static bool ro_gui_options_security_ok(wimp_w w);
41
43{
44 /* set the current values */
46 nsoption_bool(send_referer));
48 nsoption_int(expire_url));
49
50 /* initialise all functions for a newly created window */
54 0, 365, 1, 0);
60 ro_gui_wimp_event_set_help_prefix(w, "HelpSecurityConfig");
62 return true;
63
64}
65
66void ro_gui_options_security_default(wimp_pointer *pointer)
67{
68 /* set the default values */
71}
72
74{
75 nsoption_set_bool(send_referer,
77
78 nsoption_set_int(expire_url,
80
82 return true;
83}
bool ro_gui_options_security_initialise(wimp_w w)
Definition: con_secure.c:42
#define SECURITY_REFERRER
Definition: con_secure.c:31
static bool ro_gui_options_security_ok(wimp_w w)
Definition: con_secure.c:73
#define SECURITY_DURATION_FIELD
Definition: con_secure.c:32
#define SECURITY_DEFAULT_BUTTON
Definition: con_secure.c:35
#define SECURITY_CANCEL_BUTTON
Definition: con_secure.c:36
#define SECURITY_DURATION_INC
Definition: con_secure.c:33
static void ro_gui_options_security_default(wimp_pointer *pointer)
Definition: con_secure.c:66
#define SECURITY_DURATION_DEC
Definition: con_secure.c:34
#define SECURITY_OK_BUTTON
Definition: con_secure.c:37
Automated RISC OS WIMP event handling (interface).
RISC OS option setting (interface).
void ro_gui_save_options(void)
Save the current options.
Definition: dialog.c:670
Localised message support (interface).
Option reading and saving interface.
#define nsoption_int(OPTION)
Get the value of an integer option.
Definition: nsoption.h:313
#define nsoption_set_int(OPTION, VALUE)
set an integer option in the default table
Definition: nsoption.h:348
#define nsoption_set_bool(OPTION, VALUE)
set a boolean option in the default table
Definition: nsoption.h:344
#define nsoption_bool(OPTION)
Get the value of a boolean option.
Definition: nsoption.h:304
int ro_gui_get_icon_decimal(wimp_w w, wimp_i i, int decimal_places)
Get the contents of an icon as a number.
Definition: wimp.c:423
void ro_gui_set_icon_selected_state(wimp_w w, wimp_i i, bool state)
Set the selected state of an icon.
Definition: wimp.c:444
void ro_gui_set_icon_integer(wimp_w w, wimp_i i, int value)
Set the contents of an icon to a number.
Definition: wimp.c:374
bool ro_gui_get_icon_selected_state(wimp_w w, wimp_i i)
Gets the selected state of an icon.
Definition: wimp.c:463
General RISC OS WIMP/OS library functions (interface).
bool ro_gui_wimp_event_register_numeric_field(wimp_w w, wimp_i i, wimp_i up, wimp_i down, int min, int max, int stepping, int decimal_places)
Register a numeric field to be automatically handled.
Definition: wimp_event.c:1287
bool ro_gui_wimp_event_set_help_prefix(wimp_w w, const char *help_prefix)
Set the associated help prefix for a given window.
Definition: wimp_event.c:390
bool ro_gui_wimp_event_register_cancel(wimp_w w, wimp_i i)
Register a function to be called for the Cancel action on a window.
Definition: wimp_event.c:1403
bool ro_gui_wimp_event_memorise(wimp_w w)
Memorises the current state of any registered components in a window.
Definition: wimp_event.c:139
bool ro_gui_wimp_event_register_checkbox(wimp_w w, wimp_i i)
Register a checkbox to be automatically handled.
Definition: wimp_event.c:1349
bool ro_gui_wimp_event_register_ok(wimp_w w, wimp_i i, bool(*callback)(wimp_w w))
Register a function to be called for the OK action on a window.
Definition: wimp_event.c:1417
bool ro_gui_wimp_event_register_button(wimp_w w, wimp_i i, void(*callback)(wimp_pointer *pointer))
Register a function to be called when a particular button is pressed.
Definition: wimp_event.c:1387
Automated RISC OS WIMP event handling (interface).