NetSurf
Macros | Functions | Variables
con_image.c File Reference
#include <stdbool.h>
#include <swis.h>
#include <oslib/osspriteop.h>
#include <oslib/wimp.h>
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/utils.h"
#include "riscos/gui.h"
#include "riscos/configure/configure.h"
#include "riscos/dialog.h"
#include "riscos/menus.h"
#include "riscos/tinct.h"
#include "riscos/wimp.h"
#include "riscos/wimp_event.h"
Include dependency graph for con_image.c:

Go to the source code of this file.

Macros

#define IMAGE_FOREGROUND_FIELD   3
 
#define IMAGE_FOREGROUND_MENU   4
 
#define IMAGE_BACKGROUND_FIELD   6
 
#define IMAGE_BACKGROUND_MENU   7
 
#define IMAGE_CURRENT_DISPLAY   8
 
#define IMAGE_DISABLE_ANIMATION   11
 
#define IMAGE_DEFAULT_BUTTON   12
 
#define IMAGE_CANCEL_BUTTON   13
 
#define IMAGE_OK_BUTTON   14
 

Functions

static bool ro_gui_options_image_click (wimp_pointer *pointer)
 
static bool ro_gui_options_image_ok (wimp_w w)
 
static void ro_gui_options_image_redraw (wimp_draw *redraw)
 
static bool ro_gui_options_image_update (wimp_w w, wimp_i i, wimp_menu *m, wimp_selection *s, menu_action a)
 
static void ro_gui_options_image_read (wimp_w w, unsigned int *bg, unsigned int *fg)
 
static void ro_gui_options_update_shading (wimp_w w)
 
bool ro_gui_options_image_initialise (wimp_w w)
 
void ro_gui_options_image_finalise (wimp_w w)
 

Variables

static osspriteop_area * example_images
 
int example_users = 0
 
unsigned int tinct_options []
 

Macro Definition Documentation

◆ IMAGE_BACKGROUND_FIELD

#define IMAGE_BACKGROUND_FIELD   6

Definition at line 39 of file con_image.c.

◆ IMAGE_BACKGROUND_MENU

#define IMAGE_BACKGROUND_MENU   7

Definition at line 40 of file con_image.c.

◆ IMAGE_CANCEL_BUTTON

#define IMAGE_CANCEL_BUTTON   13

Definition at line 44 of file con_image.c.

◆ IMAGE_CURRENT_DISPLAY

#define IMAGE_CURRENT_DISPLAY   8

Definition at line 41 of file con_image.c.

◆ IMAGE_DEFAULT_BUTTON

#define IMAGE_DEFAULT_BUTTON   12

Definition at line 43 of file con_image.c.

◆ IMAGE_DISABLE_ANIMATION

#define IMAGE_DISABLE_ANIMATION   11

Definition at line 42 of file con_image.c.

◆ IMAGE_FOREGROUND_FIELD

#define IMAGE_FOREGROUND_FIELD   3

Definition at line 37 of file con_image.c.

◆ IMAGE_FOREGROUND_MENU

#define IMAGE_FOREGROUND_MENU   4

Definition at line 38 of file con_image.c.

◆ IMAGE_OK_BUTTON

#define IMAGE_OK_BUTTON   14

Definition at line 45 of file con_image.c.

Function Documentation

◆ ro_gui_options_image_click()

bool ro_gui_options_image_click ( wimp_pointer *  pointer)
static

Definition at line 196 of file con_image.c.

References fallthrough, IMAGE_BACKGROUND_FIELD, IMAGE_CANCEL_BUTTON, IMAGE_DEFAULT_BUTTON, IMAGE_DISABLE_ANIMATION, IMAGE_FOREGROUND_FIELD, image_quality_menu, NO_ACTION, ro_gui_options_image_read(), ro_gui_options_image_update(), ro_gui_options_update_shading(), ro_gui_set_icon_selected_state(), ro_gui_set_icon_string(), and ro_gui_wimp_event_restore().

Referenced by ro_gui_options_image_initialise().

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

◆ ro_gui_options_image_finalise()

void ro_gui_options_image_finalise ( wimp_w  w)

Definition at line 112 of file con_image.c.

References example_images, example_users, and ro_gui_wimp_event_finalise().

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_image_initialise()

bool ro_gui_options_image_initialise ( wimp_w  w)

◆ ro_gui_options_image_ok()

bool ro_gui_options_image_ok ( wimp_w  w)
static

Definition at line 239 of file con_image.c.

References IMAGE_DISABLE_ANIMATION, nsoption_int, nsoption_set_bool, ro_gui_get_icon_selected_state(), ro_gui_options_image_read(), and ro_gui_save_options().

Referenced by ro_gui_options_image_initialise().

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

◆ ro_gui_options_image_read()

void ro_gui_options_image_read ( wimp_w  w,
unsigned int *  bg,
unsigned int *  fg 
)
static

Definition at line 178 of file con_image.c.

References IMAGE_BACKGROUND_FIELD, IMAGE_FOREGROUND_FIELD, image_quality_menu, ro_gui_get_icon_string(), text(), and tinct_options.

Referenced by ro_gui_options_image_click(), ro_gui_options_image_ok(), and ro_gui_options_image_redraw().

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

◆ ro_gui_options_image_redraw()

void ro_gui_options_image_redraw ( wimp_draw *  redraw)
static

Definition at line 130 of file con_image.c.

References example_images, IMAGE_CURRENT_DISPLAY, NSLOG, ro_gui_options_image_read(), ro_warn_user(), Tinct_Plot, and Tinct_PlotAlpha.

Referenced by ro_gui_options_image_initialise().

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

◆ ro_gui_options_image_update()

bool ro_gui_options_image_update ( wimp_w  w,
wimp_i  i,
wimp_menu *  m,
wimp_selection *  s,
menu_action  a 
)
static

Definition at line 122 of file con_image.c.

References IMAGE_CURRENT_DISPLAY, and ro_gui_redraw_icon.

Referenced by ro_gui_options_image_click(), and ro_gui_options_image_initialise().

Here is the caller graph for this function:

◆ ro_gui_options_update_shading()

void ro_gui_options_update_shading ( wimp_w  w)
static

Definition at line 232 of file con_image.c.

References IMAGE_DISABLE_ANIMATION, and ro_gui_get_icon_selected_state().

Referenced by ro_gui_options_image_click(), and ro_gui_options_image_initialise().

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

Variable Documentation

◆ example_images

osspriteop_area* example_images
static

◆ example_users

int example_users = 0

Definition at line 57 of file con_image.c.

Referenced by ro_gui_options_image_finalise(), and ro_gui_options_image_initialise().

◆ tinct_options

unsigned int tinct_options[]
Initial value:
#define tinct_ERROR_DIFFUSE
Definition: tinct.h:136
#define tinct_DITHER
Definition: tinct.h:135
#define tinct_USE_OS_SPRITE_OP
Definition: tinct.h:141

Definition at line 58 of file con_image.c.

Referenced by image_redraw(), image_redraw_tinct(), ro_gui_options_image_initialise(), and ro_gui_options_image_read().