Dillo v3.1.1-119-g140d9ebd
|
Dillo web browser. More...
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <locale.h>
#include <errno.h>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/fl_ask.H>
#include <FL/fl_draw.H>
#include "msg.h"
#include "paths.hh"
#include "uicmd.hh"
#include "prefs.h"
#include "prefsparser.hh"
#include "keys.hh"
#include "bw.h"
#include "misc.h"
#include "history.h"
#include "version.hh"
#include "dns.h"
#include "web.hh"
#include "IO/tls.h"
#include "IO/Url.h"
#include "IO/mime.h"
#include "capi.h"
#include "dicache.h"
#include "cookies.h"
#include "actions.h"
#include "hsts.h"
#include "domain.h"
#include "auth.h"
#include "styleengine.hh"
#include "dw/fltkcore.hh"
#include "dw/widget.hh"
#include "dw/textblock.hh"
#include "dw/table.hh"
Go to the source code of this file.
Enumerations | |
enum | OptID { DILLO_CLI_NONE = 0 , DILLO_CLI_XID = 1 << 0 , DILLO_CLI_FULLWINDOW = 1 << 1 , DILLO_CLI_HELP = 1 << 2 , DILLO_CLI_VERSION = 1 << 3 , DILLO_CLI_LOCAL = 1 << 4 , DILLO_CLI_GEOMETRY = 1 << 5 , DILLO_CLI_ERROR = 1 << 15 } |
Command line options structure. More... | |
Functions | |
static void | raw_sigchld2 (int signum) |
Avoid our children (Dpid) to become zombies. | |
static void | handler_usr1 (int signum) |
static void | est_sigchld (void) |
Establish SIGCHLD handler. | |
static void | printHelp (const char *cmdname, const CLI_options *options) |
Print help text generated from the options structure. | |
static int | numOptions (const CLI_options *options) |
Return the maximum number of option arguments. | |
static OptID | getCmdOption (const CLI_options *options, int argc, char **argv, char **opt_argv, int *idx) |
Get next command line option. | |
static void | custLabelDraw (const Fl_Label *o, int X, int Y, int W, int H, Fl_Align align) |
Set FL_NORMAL_LABEL to interpret neither symbols (@) nor shortcuts (&), and FL_FREE_LABELTYPE to interpret shortcuts. | |
static void | custLabelMeasure (const Fl_Label *o, int &W, int &H) |
static void | custMenuLabelDraw (const Fl_Label *o, int X, int Y, int W, int H, Fl_Align align) |
static void | custMenuLabelMeasure (const Fl_Label *o, int &W, int &H) |
static void | checkFont (const char *name, const char *type) |
Tell the user if default/pref fonts can't be found. | |
static void | checkPreferredFonts () |
static void | setUIColorWdef (Fl_Color idx, int32_t color, Fl_Color default_val) |
Set UI color. | |
static void | setColors () |
static DilloUrl * | makeStartUrl (char *str, bool local) |
Given a command line argument, build a DilloUrl for it. | |
int | main (int argc, char **argv) |
Variables | |
static volatile sig_atomic_t | sig_reload = 0 |
static const CLI_options | Options [] |
Dillo web browser.
Definition in file dillo.cc.
enum OptID |
|
static |
Tell the user if default/pref fonts can't be found.
Definition at line 310 of file dillo.cc.
References dw::fltk::FltkFont::fontExists(), and MSG_WARN.
Referenced by checkPreferredFonts().
|
static |
Definition at line 316 of file dillo.cc.
References checkFont(), DilloPrefs::font_cursive, DilloPrefs::font_fantasy, DilloPrefs::font_monospace, DilloPrefs::font_sans_serif, DilloPrefs::font_serif, and prefs.
Referenced by main().
|
static |
|
static |
|
static |
|
static |
|
static |
Establish SIGCHLD handler.
Definition at line 161 of file dillo.cc.
References handler_usr1(), and raw_sigchld2().
Referenced by main().
|
static |
Get next command line option.
Definition at line 215 of file dillo.cc.
References DILLO_CLI_ERROR, and DILLO_CLI_NONE.
Referenced by main().
|
static |
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 401 of file dillo.cc.
References a_Actions_init(), a_Auth_init(), a_Bw_init(), a_Cache_freeall(), a_Capi_init(), a_Cookies_freeall(), a_Cookies_init(), a_Dicache_freeall(), a_Dicache_init(), a_Dns_freeall(), a_Dns_init(), a_Domain_freeall(), a_Domain_parse(), a_Dpi_init(), a_History_freeall(), a_Hsts_freeall(), a_Hsts_init(), a_Http_freeall(), a_Http_init(), a_Http_proxy_auth(), a_Http_set_proxy_passwd(), a_Mime_init(), a_Misc_parse_geometry(), a_Prefs_freeall(), a_Prefs_init(), a_Tls_freeall(), a_Tls_init(), a_UIcmd_browser_window_new(), a_UIcmd_get_passwd(), a_UIcmd_init(), a_UIcmd_open_url(), a_UIcmd_open_url_nt(), a_UIcmd_open_url_nw(), a_UIcmd_reload_all_active(), a_UIcmd_set_location_text(), a_Url_free(), a_Version_print_info(), a_Web_init(), DilloPrefs::adjust_min_width, DilloPrefs::adjust_table_min_width, checkPreferredFonts(), custLabelDraw(), custLabelMeasure(), custMenuLabelDraw(), custMenuLabelMeasure(), dFree(), DILLO_CLI_FULLWINDOW, DILLO_CLI_GEOMETRY, DILLO_CLI_HELP, DILLO_CLI_LOCAL, DILLO_CLI_VERSION, DILLO_CLI_XID, dLib_show_messages(), dNew0, dStrAsciiCasecmp(), est_sigchld(), DilloPrefs::font_sans_serif, Keys::free(), Paths::free(), dw::core::freeall(), dw::fltk::freeall(), DilloPrefs::fullwindow_start, dw::fltk::FltkFont::get(), getCmdOption(), Paths::getPrefsFP(), DilloPrefs::height, DilloPrefs::http_proxyuser, Keys::init(), StyleEngine::init(), Paths::init(), makeStartUrl(), DilloPrefs::middle_click_opens_new_tab, MSG, MSG_WARN, numOptions(), Options, Keys::parse(), PATHS_HSTS_PRELOAD, PATHS_RC_DOMAIN, PATHS_RC_KEYS, PATHS_RC_PREFS, DilloPrefs::penalty_em_dash_left, DilloPrefs::penalty_em_dash_right, DilloPrefs::penalty_em_dash_right_2, DilloPrefs::penalty_hyphen, DilloPrefs::penalty_hyphen_2, prefs, PREFS_GEOMETRY_DEFAULT_HEIGHT, PREFS_GEOMETRY_DEFAULT_WIDTH, PREFS_GEOMETRY_DEFAULT_XPOS, PREFS_GEOMETRY_DEFAULT_YPOS, printHelp(), dw::core::Widget::setAdjustMinWidth(), dw::Table::setAdjustTableMinWidth(), setColors(), dw::Textblock::setPenaltyEmDashLeft(), dw::Textblock::setPenaltyEmDashRight(), dw::Textblock::setPenaltyEmDashRight2(), dw::Textblock::setPenaltyHyphen(), dw::Textblock::setPenaltyHyphen2(), dw::Textblock::setStretchabilityFactor(), DilloPrefs::show_msg, DilloPrefs::show_ui_tooltip, sig_reload, DilloPrefs::start_page, DilloPrefs::stretchability_factor, DilloPrefs::theme, TRUE, BrowserWindow::ui, URL_PATH, URL_SCHEME, URL_STR, DilloPrefs::width, DilloPrefs::xpos, and DilloPrefs::ypos.
|
static |
Given a command line argument, build a DilloUrl for it.
Definition at line 371 of file dillo.cc.
References a_Misc_escape_chars(), a_Url_new(), a_Url_set_flags(), a_Url_string_strip_delimiters(), dFree(), dStrconcat(), dStrdup(), Paths::getOldWorkingDir(), URL_FLAGS, and URL_SpamSafe.
Referenced by main().
|
static |
|
static |
|
static |
Avoid our children (Dpid) to become zombies.
:-) Notes: . We let sigaction block SIGCHLD while in the handler. . Portability is not simple. e.g. http://www.faqs.org/faqs/unix-faq/faq/part3/section-13.html man sigaction, waitpid
Definition at line 128 of file dillo.cc.
Referenced by est_sigchld().
|
static |
Definition at line 337 of file dillo.cc.
References prefs, PREFS_UI_BUTTON_HIGHLIGHT_COLOR, PREFS_UI_TAB_ACTIVE_BG_COLOR, PREFS_UI_TAB_ACTIVE_FG_COLOR, PREFS_UI_TAB_BG_COLOR, PREFS_UI_TAB_FG_COLOR, setUIColorWdef(), DilloPrefs::ui_button_highlight_color, DilloPrefs::ui_fg_color, DilloPrefs::ui_main_bg_color, DilloPrefs::ui_selection_color, DilloPrefs::ui_tab_active_bg_color, DilloPrefs::ui_tab_active_fg_color, DilloPrefs::ui_tab_bg_color, DilloPrefs::ui_tab_fg_color, and DilloPrefs::ui_text_bg_color.
Referenced by main().
|
static |
Set UI color.
'color' is an 0xrrggbb value, whereas 'default_val' is a fltk color (index 0-0xFF, or 0xrrggbb00).
Definition at line 329 of file dillo.cc.
Referenced by setColors().
|
static |
Definition at line 95 of file dillo.cc.
Referenced by main().
|
static |
Definition at line 71 of file dillo.cc.
Referenced by handler_usr1(), and main().