NetSurf
Data Structures | Macros | Functions | Variables
con_theme.c File Reference
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <oslib/osspriteop.h>
#include <oslib/wimp.h>
#include <oslib/wimpspriteop.h>
#include "utils/config.h"
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "riscos/gui.h"
#include "riscos/configure/configure.h"
#include "riscos/configure.h"
#include "riscos/dialog.h"
#include "riscos/menus.h"
#include "riscos/theme.h"
#include "riscos/toolbar.h"
#include "riscos/url_complete.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
#include "riscos/wimputils.h"
Include dependency graph for con_theme.c:

Go to the source code of this file.

Data Structures

struct  toolbar_display
 

Macros

#define THEME_PANE_AREA   0
 
#define THEME_DEFAULT_BUTTON   2
 
#define THEME_CANCEL_BUTTON   3
 
#define THEME_OK_BUTTON   4
 

Functions

static bool ro_gui_options_theme_ok (wimp_w w)
 
static bool ro_gui_options_theme_click (wimp_pointer *pointer)
 
static void ro_gui_options_theme_load (void)
 
static void ro_gui_options_theme_free (void)
 
bool ro_gui_options_theme_initialise (wimp_w w)
 
void ro_gui_options_theme_finalise (wimp_w w)
 

Variables

static wimp_window theme_pane_definition
 
static wimp_w theme_pane
 
static struct theme_descriptortheme_list = NULL
 
static struct toolbar_displaytoolbars = NULL
 
static char theme_radio_validation [] = "Sradiooff,radioon"
 
static char theme_null_validation [] = ""
 
static char theme_line_validation [] = "R2"
 

Macro Definition Documentation

◆ THEME_CANCEL_BUTTON

#define THEME_CANCEL_BUTTON   3

Definition at line 46 of file con_theme.c.

◆ THEME_DEFAULT_BUTTON

#define THEME_DEFAULT_BUTTON   2

Definition at line 45 of file con_theme.c.

◆ THEME_OK_BUTTON

#define THEME_OK_BUTTON   4

Definition at line 47 of file con_theme.c.

◆ THEME_PANE_AREA

#define THEME_PANE_AREA   0

Definition at line 44 of file con_theme.c.

Function Documentation

◆ ro_gui_options_theme_click()

bool ro_gui_options_theme_click ( wimp_pointer *  pointer)
static

Definition at line 220 of file con_theme.c.

References toolbar::next, ro_gui_set_icon_selected_state(), ro_gui_theme_find(), ro_gui_wimp_event_memorise(), ro_gui_wimp_event_restore(), THEME_CANCEL_BUTTON, THEME_DEFAULT_BUTTON, THEME_OK_BUTTON, theme_pane, toolbar_display::toolbar, and toolbars.

Referenced by ro_gui_options_theme_initialise().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_options_theme_finalise()

void ro_gui_options_theme_finalise ( wimp_w  w)

Definition at line 176 of file con_theme.c.

References NSLOG, ro_gui_options_theme_free(), ro_gui_wimp_event_finalise(), ro_warn_user(), and theme_pane.

Referenced by ro_gui_configure_initialise().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_options_theme_free()

void ro_gui_options_theme_free ( void  )
static

Definition at line 404 of file con_theme.c.

References toolbar::next, ro_gui_theme_close(), ro_toolbar_destroy(), theme_list, theme_pane, toolbar_display::toolbar, and toolbars.

Referenced by ro_gui_options_theme_finalise(), and ro_gui_options_theme_load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_options_theme_initialise()

bool ro_gui_options_theme_initialise ( wimp_w  w)

Definition at line 94 of file con_theme.c.

References toolbar::next, NSLOG, nsoption_charp, PTR_WIMP_OPEN, ro_get_vscroll_width(), ro_gui_options_theme_click(), ro_gui_options_theme_load(), ro_gui_options_theme_ok(), ro_gui_set_icon_selected_state(), ro_gui_theme_find(), ro_gui_wimp_event_memorise(), ro_gui_wimp_event_register_cancel(), ro_gui_wimp_event_register_mouse_click(), ro_gui_wimp_event_register_ok(), ro_gui_wimp_event_set_help_prefix(), THEME_CANCEL_BUTTON, THEME_OK_BUTTON, theme_pane, THEME_PANE_AREA, theme_pane_definition, toolbar_display::toolbar, and toolbars.

Referenced by ro_gui_configure_initialise().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_options_theme_load()

void ro_gui_options_theme_load ( void  )
static

◆ ro_gui_options_theme_ok()

bool ro_gui_options_theme_ok ( wimp_w  w)
static

Definition at line 193 of file con_theme.c.

References theme_descriptor::leafname, toolbar::next, nsoption_set_charp, ro_gui_get_icon_selected_state(), ro_gui_save_options(), ro_gui_theme_apply(), ro_gui_wimp_event_memorise(), theme_pane, toolbar_display::toolbar, and toolbars.

Referenced by ro_gui_options_theme_initialise().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ theme_line_validation

char theme_line_validation[] = "R2"
static

Definition at line 87 of file con_theme.c.

Referenced by ro_gui_options_theme_load().

◆ theme_list

struct theme_descriptor* theme_list = NULL
static

Definition at line 83 of file con_theme.c.

Referenced by ro_gui_options_theme_free(), and ro_gui_options_theme_load().

◆ theme_null_validation

char theme_null_validation[] = ""
static

Definition at line 86 of file con_theme.c.

Referenced by ro_gui_options_theme_load().

◆ theme_pane

wimp_w theme_pane
static

◆ theme_pane_definition

wimp_window theme_pane_definition
static
Initial value:
= {
{0, 0, 16, 16},
0,
0,
wimp_TOP,
wimp_WINDOW_NEW_FORMAT | wimp_WINDOW_VSCROLL | wimp_WINDOW_AUTO_REDRAW,
wimp_COLOUR_BLACK,
wimp_COLOUR_LIGHT_GREY,
wimp_COLOUR_LIGHT_GREY,
wimp_COLOUR_VERY_LIGHT_GREY,
wimp_COLOUR_DARK_GREY,
wimp_COLOUR_MID_LIGHT_GREY,
wimp_COLOUR_CREAM,
0,
{0, -16384, 16384, 0},
wimp_ICON_TEXT | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED,
wimp_BUTTON_CLICK << wimp_ICON_BUTTON_TYPE_SHIFT,
wimpspriteop_AREA,
1,
1,
{""},
0,
{}
}

Definition at line 56 of file con_theme.c.

Referenced by ro_gui_options_theme_initialise().

◆ theme_radio_validation

char theme_radio_validation[] = "Sradiooff,radioon"
static

Definition at line 85 of file con_theme.c.

Referenced by ro_gui_options_theme_load().

◆ toolbars

struct toolbar_display* toolbars = NULL
static