NetSurf
|
#include "utils/config.h"
#include <assert.h>
#include <stdbool.h>
#include <string.h>
#include <oslib/wimp.h>
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/nsurl.h"
#include "netsurf/url_db.h"
#include "riscos/gui.h"
#include "riscos/dialog.h"
#include "riscos/wimp_event.h"
Go to the source code of this file.
Data Structures | |
struct | session_401 |
login window session data More... | |
Macros | |
#define | ICON_401LOGIN_LOGIN 0 |
#define | ICON_401LOGIN_CANCEL 1 |
#define | ICON_401LOGIN_HOST 2 |
#define | ICON_401LOGIN_REALM 3 |
#define | ICON_401LOGIN_USERNAME 4 |
#define | ICON_401LOGIN_PASSWORD 5 |
Functions | |
static void | ro_gui_401login_close (wimp_w w) |
Handle closing of login dialog. More... | |
static bool | ro_gui_401login_apply (wimp_w w) |
static nserror | ro_gui_401login_open (nsurl *url, lwc_string *host, const char *realm, const char *username, const char *password, nserror(*cb)(const char *username, const char *password, void *pw), void *cbpw) |
Open a 401 login window. More... | |
void | ro_gui_401login_init (void) |
Load the 401 login window template. More... | |
nserror | gui_401login_open (nsurl *url, const char *realm, const char *username, const char *password, nserror(*cb)(const char *username, const char *password, void *pw), void *cbpw) |
Open the login dialog. More... | |
Variables | |
static wimp_window * | dialog_401_template |
#define ICON_401LOGIN_CANCEL 1 |
Definition at line 36 of file 401login.c.
Referenced by ro_gui_401login_open().
#define ICON_401LOGIN_HOST 2 |
Definition at line 37 of file 401login.c.
Referenced by ro_gui_401login_open().
#define ICON_401LOGIN_LOGIN 0 |
Definition at line 35 of file 401login.c.
Referenced by ro_gui_401login_open().
#define ICON_401LOGIN_PASSWORD 5 |
Definition at line 40 of file 401login.c.
Referenced by ro_gui_401login_open().
#define ICON_401LOGIN_REALM 3 |
Definition at line 38 of file 401login.c.
Referenced by ro_gui_401login_open().
#define ICON_401LOGIN_USERNAME 4 |
Definition at line 39 of file 401login.c.
Referenced by ro_gui_401login_open().
nserror gui_401login_open | ( | nsurl * | url, |
const char * | realm, | ||
const char * | username, | ||
const char * | password, | ||
nserror(*)(const char *username, const char *password, void *pw) | cb, | ||
void * | cbpw | ||
) |
Open the login dialog.
login window request.
Definition at line 80 of file 401login.c.
References ami_gui_get_screen(), ami_gui_get_screen_title(), ami_gui_get_shared_msgport(), ami_gui_win_list_add(), AMI_LOGIN_MSG_CANCEL, AMI_LOGIN_MSG_HOST, AMI_LOGIN_MSG_LOGIN, AMI_LOGIN_MSG_PASS, AMI_LOGIN_MSG_REALM, AMI_LOGIN_MSG_USER, ami_utf8_easy(), ami_utf8_free(), AMINS_LOGINWINDOW, ButtonObj, session_401::cb, gui_login_window::cb, gui_login_window::cbpw, GID_L_CANCEL, GID_L_LOGIN, GID_L_MAIN, GID_L_PASS, GID_L_USER, gui_login_window::host, LabelObj, LayoutHObj, LayoutVObj, gui_login_window::messages, messages_get(), NSERROR_OK, nsurl_access(), nsurl_get_component(), NSURL_HOST, nsurl_ref(), gui_login_window::objects, OID_L_MAIN, gui_login_window::pwd, gui_login_window::realm, ro_gui_401login_open(), StringObj, gui_login_window::uname, gui_login_window::url, and WindowObj.
|
static |
Definition at line 219 of file 401login.c.
References session_401::cb, session_401::cbpw, session_401::pwd, ro_gui_wimp_event_get_user_data(), and session_401::uname.
Referenced by ro_gui_401login_open().
|
static |
Handle closing of login dialog.
Definition at line 188 of file 401login.c.
References session_401::cb, session_401::cbpw, session_401::host, NSLOG, nsurl_unref(), session_401::realm, ro_gui_wimp_event_finalise(), ro_gui_wimp_event_get_user_data(), ro_warn_user(), and session_401::url.
Referenced by ro_gui_401login_open().
void ro_gui_401login_init | ( | void | ) |
Load the 401 login window template.
Definition at line 71 of file 401login.c.
References ro_gui_dialog_load_template().
Referenced by ro_gui_dialog_init().
|
static |
Open a 401 login window.
Definition at line 103 of file 401login.c.
References session_401::cb, session_401::cbpw, session_401::host, ICON_401LOGIN_CANCEL, ICON_401LOGIN_HOST, ICON_401LOGIN_LOGIN, ICON_401LOGIN_PASSWORD, ICON_401LOGIN_REALM, ICON_401LOGIN_USERNAME, NSERROR_NOMEM, NSERROR_OK, nsurl_ref(), nsurl_unref(), session_401::pwd, session_401::realm, ro_gui_401login_apply(), ro_gui_401login_close(), ro_gui_dialog_open_persistent(), ro_gui_wimp_event_register_cancel(), ro_gui_wimp_event_register_close_window(), ro_gui_wimp_event_register_ok(), ro_gui_wimp_event_register_text_field(), ro_gui_wimp_event_set_user_data(), ro_warn_user(), session_401::uname, and session_401::url.
Referenced by gui_401login_open().
|
static |
Definition at line 52 of file 401login.c.