NetSurf
|
#include "utils/config.h"
#include <limits.h>
#include <stdbool.h>
#include <windows.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <io.h>
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/filepath.h"
#include "utils/file.h"
#include "utils/nsurl.h"
#include "utils/nsoption.h"
#include "netsurf/url_db.h"
#include "netsurf/cookie_db.h"
#include "netsurf/browser.h"
#include "netsurf/browser_window.h"
#include "netsurf/fetch.h"
#include "netsurf/misc.h"
#include "netsurf/netsurf.h"
#include "desktop/hotlist.h"
#include "windows/findfile.h"
#include "windows/file.h"
#include "windows/cookies.h"
#include "windows/drawable.h"
#include "windows/corewindow.h"
#include "windows/download.h"
#include "windows/local_history.h"
#include "windows/window.h"
#include "windows/schedule.h"
#include "windows/font.h"
#include "windows/fetch.h"
#include "windows/pointers.h"
#include "windows/bitmap.h"
#include "windows/clipboard.h"
#include "windows/gui.h"
Go to the source code of this file.
Functions | |
static int | get_screen_dpi (void) |
Obtain the DPI of the display. More... | |
static nserror | get_config_home (char **config_home_out) |
Get the path to the config directory. More... | |
static void | die (const char *error) |
Cause an abnormal program termination. More... | |
static bool | nslog_ensure (FILE *fptr) |
Ensures output logging stream is available. More... | |
static nserror | set_defaults (struct nsoption_s *defaults) |
Set option defaults for windows frontend. More... | |
static nserror | nsw32_option_init (int *pargc, char **argv, char **respaths, char *config_path) |
Initialise user options location and contents. More... | |
static nserror | nsw32_messages_init (char **respaths) |
Initialise messages. More... | |
static nserror | win32_to_unix_commandline (int *argc_out, char ***argv_out) |
Construct a unix style argc/argv. More... | |
int WINAPI | WinMain (HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd) |
Entry point from windows. More... | |
Variables | |
static struct gui_misc_table | win32_misc_table |
|
static |
|
static |
Get the path to the config directory.
This ought to use SHGetKnownFolderPath(FOLDERID_RoamingAppData) and PathCcpAppend() but uses depricated API because that is what mingw supports.
config_home_out | Path to configuration directory. |
Definition at line 91 of file main.c.
References NSERROR_INVALID, NSERROR_NOT_DIRECTORY, NSERROR_NOT_FOUND, NSERROR_OK, and NSLOG.
Referenced by WinMain().
|
static |
|
static |
|
static |
Initialise messages.
Definition at line 294 of file main.c.
References filepath_find(), messages_add_from_file(), messages_add_from_inline(), NSERROR_NOT_FOUND, NSERROR_OK, nsw32_get_resource_data(), and respaths.
Referenced by WinMain().
|
static |
Initialise user options location and contents.
Definition at line 263 of file main.c.
References G_config_path, G_resource_pathv, netsurf_mkpath(), NSERROR_OK, nsoption_commandline(), nsoption_init(), nsoption_read(), nsoptions, nsoptions_default, respaths, and set_defaults().
Referenced by WinMain().
|
static |
Set option defaults for windows frontend.
defaults | The option table to update. |
Definition at line 162 of file main.c.
References filepath_sfind(), G_config_path, G_resource_pathv, netsurf_mkpath(), NSERROR_NOMEM, NSERROR_OK, nsoption_setnull_charp, and PATH_MAX.
Referenced by nsw32_option_init().
|
static |
Construct a unix style argc/argv.
argc_out | number of commandline arguments |
argv_out | string vector of command line arguments |
Definition at line 326 of file main.c.
References NSERROR_INVALID, NSERROR_NOMEM, and NSERROR_OK.
Referenced by WinMain().
int WINAPI WinMain | ( | HINSTANCE | hInstance, |
HINSTANCE | hLastInstance, | ||
LPSTR | lpcli, | ||
int | ncmd | ||
) |
Entry point from windows.
Definition at line 381 of file main.c.
References browser_set_dpi(), browser_window_create(), BW_CREATE_HISTORY, die(), get_config_home(), get_screen_dpi(), hinst, hotlist_init(), messages_get_errorcode(), netsurf_table::misc, netsurf_exit(), netsurf_init(), netsurf_register(), NSERROR_OK, NSLOG, nslog_ensure(), nslog_finalise(), nslog_init(), nsoption_charp, nsoption_finalise(), nsoption_set_bool, nsoptions, nsoptions_default, nsurl_create(), nsurl_unref(), nsw32_create_corewindow_class(), nsw32_messages_init(), nsw32_option_init(), nsws_create_drawable_class(), nsws_create_main_class(), nsws_init_resource(), nsws_window_init_pointers(), respaths, urldb_load(), urldb_load_cookies(), urldb_save(), urldb_save_cookies(), win32_bitmap_table, win32_clipboard_table, win32_core_window_table, win32_download_table, win32_fetch_table, win32_file_table, win32_layout_table, win32_misc_table, win32_run(), win32_to_unix_commandline(), win32_utf8_table, win32_warning(), and win32_window_table.
|
static |
Definition at line 372 of file main.c.
Referenced by WinMain().