25 #include <proto/exec.h> 26 #include <proto/intuition.h> 27 #include <proto/utility.h> 29 #include <proto/window.h> 30 #include <proto/layout.h> 31 #include <proto/string.h> 32 #include <proto/button.h> 33 #include <proto/label.h> 34 #include <classes/window.h> 35 #include <gadgets/layout.h> 36 #include <gadgets/string.h> 37 #include <gadgets/button.h> 38 #include <images/label.h> 39 #include <reaction/reaction_macros.h> 78 nserror (*
cb)(
const char *username,
const char *password,
void *pw);
97 const char *username,
const char *password,
107 assert(host != NULL);
108 assert(username != NULL);
109 assert(password != NULL);
113 lw->
realm = (realm != NULL) ? strdup(realm) : NULL;
126 if(user_utf8 != NULL) {
127 len = strlen(user_utf8);
128 assert(len <
sizeof(lw->
uname));
129 memcpy(lw->
uname, user_utf8, len + 1);
134 if(pass_utf8 != NULL) {
135 len = strlen(pass_utf8);
136 assert(len <
sizeof(lw->
pwd));
137 memcpy(lw->
pwd, pass_utf8, len + 1);
145 WA_DepthGadget, TRUE,
147 WA_CloseGadget, FALSE,
152 WINDOW_IconifyGadget, FALSE,
153 WINDOW_LockHeight,TRUE,
154 WINDOW_Position, WPOS_CENTERSCREEN,
157 STRINGA_TextVal, lwc_string_data(lw->host),
163 CHILD_WeightedHeight,0,
165 STRINGA_TextVal,lw->realm,
171 CHILD_WeightedHeight,0,
175 STRINGA_TextVal, lw->uname,
180 CHILD_WeightedHeight,0,
183 STRINGA_HookType,SHK_PASSWORD,
185 STRINGA_TextVal, lw->pwd,
190 CHILD_WeightedHeight,0,
198 CHILD_WeightedHeight,0,
206 CHILD_WeightedHeight,0,
210 lw->win = (
struct Window *)RA_OpenWindow(lw->objects[
OID_L_MAIN]);
222 lw->
cb(NULL, NULL, lw->
cbpw);
225 lwc_string_unref(lw->
host);
250 if(user_utf8 && pass_utf8) {
251 lw->
cb(user_utf8, pass_utf8, lw->
cbpw);
275 switch(result & WMHI_CLASSMASK)
278 switch(result & WMHI_GADGETMASK)
char * ami_utf8_easy(const char *string)
nserror(* cb)(const char *username, const char *password, void *pw)
Interface to utility string handling.
static const struct ami_win_event_table ami_login_table
Localised message support (interface).
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)
login window request.
Core mouse and pointer states.
Interface to platform-specific graphical user interface window operations.
static BOOL ami_401login_event(void *w)
STRPTR ami_gui_get_screen_title(void)
Get the string for NetSurf's screen titlebar.
void ami_utf8_free(char *ptr)
struct Screen * ami_gui_get_screen(void)
Get a pointer to the screen NetSurf is running on.
nserror
Enumeration of error codes.
Object * objects[GID_L_LAST]
lwc_string * nsurl_get_component(const nsurl *url, nsurl_component part)
Get part of a URL as a lwc_string, from a NetSurf URL object.
static void ami_401login_login(struct gui_login_window *lw)
nserror amiga_warn_user(const char *warning, const char *detail)
Warn the user of an event.
static void ami_401login_close(void *w)
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Unified URL information database public interface.
nsurl * nsurl_ref(nsurl *url)
Increment the reference count to a NetSurf URL object.
char * ami_to_utf8_easy(const char *string)
struct ami_generic_window w
const char * nsurl_access(const nsurl *url)
Access a NetSurf URL object as a string.
char * messages[AMI_LOGIN_MSG_MAX]
void ami_gui_win_list_remove(void *win)
Remove a window from the NetSurf window list.
Minimal compatibility header for AmigaOS 3.
nserror ami_gui_win_list_add(void *win, int type, const struct ami_win_event_table *table)
Add a window to the NetSurf window list (to enable event processing)
NetSurf URL handling (interface).
struct nsurl nsurl
NetSurf URL object.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
struct MsgPort * ami_gui_get_shared_msgport(void)
Get shared message port.