├── CMakeLists.txt ├── CONTRIBUTING.md ├── ChangeLog ├── LICENSE ├── README.md ├── appimage ├── AppRun-gtk ├── AppRun-vi ├── mkappimage.sh ├── neosurf-gtk.desktop ├── neosurf-vi.desktop └── neosurf.png ├── contrib ├── CMakeLists.txt ├── libcss │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── docs │ │ ├── API │ │ ├── Bytecode │ │ ├── Colour │ │ ├── Grammar │ │ ├── Lexer │ │ ├── Representation │ │ └── Tokens │ ├── include │ │ └── libcss │ │ │ ├── computed.h │ │ │ ├── errors.h │ │ │ ├── font_face.h │ │ │ ├── fpmath.h │ │ │ ├── functypes.h │ │ │ ├── hint.h │ │ │ ├── libcss.h │ │ │ ├── properties.h │ │ │ ├── select.h │ │ │ ├── stylesheet.h │ │ │ ├── types.h │ │ │ └── unit.h │ └── src │ │ ├── bytecode │ │ ├── bytecode.h │ │ └── opcodes.h │ │ ├── charset │ │ ├── detect.c │ │ └── detect.h │ │ ├── lex │ │ ├── lex.c │ │ └── lex.h │ │ ├── parse │ │ ├── font_face.c │ │ ├── font_face.h │ │ ├── important.c │ │ ├── important.h │ │ ├── language.c │ │ ├── language.h │ │ ├── mq.c │ │ ├── mq.h │ │ ├── parse.c │ │ ├── parse.h │ │ ├── properties │ │ │ ├── .gitignore │ │ │ ├── azimuth.c │ │ │ ├── background.c │ │ │ ├── background_position.c │ │ │ ├── border.c │ │ │ ├── border_color.c │ │ │ ├── border_spacing.c │ │ │ ├── border_style.c │ │ │ ├── border_width.c │ │ │ ├── clip.c │ │ │ ├── column_rule.c │ │ │ ├── columns.c │ │ │ ├── content.c │ │ │ ├── cue.c │ │ │ ├── cursor.c │ │ │ ├── elevation.c │ │ │ ├── flex.c │ │ │ ├── flex_flow.c │ │ │ ├── font.c │ │ │ ├── font_family.c │ │ │ ├── font_weight.c │ │ │ ├── gen_parser │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── css_property_parser_gen.c │ │ │ ├── list_style.c │ │ │ ├── list_style_type.c │ │ │ ├── margin.c │ │ │ ├── opacity.c │ │ │ ├── outline.c │ │ │ ├── overflow.c │ │ │ ├── padding.c │ │ │ ├── parser_wrapper.sh │ │ │ ├── pause.c │ │ │ ├── play_during.c │ │ │ ├── properties.c │ │ │ ├── properties.gen │ │ │ ├── properties.h │ │ │ ├── quotes.c │ │ │ ├── text_decoration.c │ │ │ ├── utils.c │ │ │ ├── utils.h │ │ │ └── voice_family.c │ │ ├── propstrings.c │ │ └── propstrings.h │ │ ├── select │ │ ├── .gitignore │ │ ├── arena.c │ │ ├── arena.h │ │ ├── arena_hash.h │ │ ├── assets.py │ │ ├── bloom.h │ │ ├── computed.c │ │ ├── computed.h │ │ ├── dispatch.c │ │ ├── dispatch.h │ │ ├── font_face.c │ │ ├── font_face.h │ │ ├── format_list_style.c │ │ ├── hash.c │ │ ├── hash.h │ │ ├── helpers.h │ │ ├── mq.h │ │ ├── overrides.py │ │ ├── properties │ │ │ ├── align_content.c │ │ │ ├── align_items.c │ │ │ ├── align_self.c │ │ │ ├── azimuth.c │ │ │ ├── background_attachment.c │ │ │ ├── background_color.c │ │ │ ├── background_image.c │ │ │ ├── background_position.c │ │ │ ├── background_repeat.c │ │ │ ├── border_bottom_color.c │ │ │ ├── border_bottom_style.c │ │ │ ├── border_bottom_width.c │ │ │ ├── border_collapse.c │ │ │ ├── border_left_color.c │ │ │ ├── border_left_style.c │ │ │ ├── border_left_width.c │ │ │ ├── border_right_color.c │ │ │ ├── border_right_style.c │ │ │ ├── border_right_width.c │ │ │ ├── border_spacing.c │ │ │ ├── border_top_color.c │ │ │ ├── border_top_style.c │ │ │ ├── border_top_width.c │ │ │ ├── bottom.c │ │ │ ├── box_sizing.c │ │ │ ├── break_after.c │ │ │ ├── break_before.c │ │ │ ├── break_inside.c │ │ │ ├── caption_side.c │ │ │ ├── clear.c │ │ │ ├── clip.c │ │ │ ├── color.c │ │ │ ├── column_count.c │ │ │ ├── column_fill.c │ │ │ ├── column_gap.c │ │ │ ├── column_rule_color.c │ │ │ ├── column_rule_style.c │ │ │ ├── column_rule_width.c │ │ │ ├── column_span.c │ │ │ ├── column_width.c │ │ │ ├── content.c │ │ │ ├── counter_increment.c │ │ │ ├── counter_reset.c │ │ │ ├── cue_after.c │ │ │ ├── cue_before.c │ │ │ ├── cursor.c │ │ │ ├── direction.c │ │ │ ├── display.c │ │ │ ├── elevation.c │ │ │ ├── empty_cells.c │ │ │ ├── flex_basis.c │ │ │ ├── flex_direction.c │ │ │ ├── flex_grow.c │ │ │ ├── flex_shrink.c │ │ │ ├── flex_wrap.c │ │ │ ├── float.c │ │ │ ├── font_family.c │ │ │ ├── font_size.c │ │ │ ├── font_style.c │ │ │ ├── font_variant.c │ │ │ ├── font_weight.c │ │ │ ├── height.c │ │ │ ├── helpers.c │ │ │ ├── helpers.h │ │ │ ├── justify_content.c │ │ │ ├── left.c │ │ │ ├── letter_spacing.c │ │ │ ├── line_height.c │ │ │ ├── list_style_image.c │ │ │ ├── list_style_position.c │ │ │ ├── list_style_type.c │ │ │ ├── margin_bottom.c │ │ │ ├── margin_left.c │ │ │ ├── margin_right.c │ │ │ ├── margin_top.c │ │ │ ├── max_height.c │ │ │ ├── max_width.c │ │ │ ├── min_height.c │ │ │ ├── min_width.c │ │ │ ├── opacity.c │ │ │ ├── order.c │ │ │ ├── orphans.c │ │ │ ├── outline_color.c │ │ │ ├── outline_style.c │ │ │ ├── outline_width.c │ │ │ ├── overflow_x.c │ │ │ ├── overflow_y.c │ │ │ ├── padding_bottom.c │ │ │ ├── padding_left.c │ │ │ ├── padding_right.c │ │ │ ├── padding_top.c │ │ │ ├── page_break_after.c │ │ │ ├── page_break_before.c │ │ │ ├── page_break_inside.c │ │ │ ├── pause_after.c │ │ │ ├── pause_before.c │ │ │ ├── pitch.c │ │ │ ├── pitch_range.c │ │ │ ├── play_during.c │ │ │ ├── position.c │ │ │ ├── properties.h │ │ │ ├── quotes.c │ │ │ ├── richness.c │ │ │ ├── right.c │ │ │ ├── speak.c │ │ │ ├── speak_header.c │ │ │ ├── speak_numeral.c │ │ │ ├── speak_punctuation.c │ │ │ ├── speech_rate.c │ │ │ ├── stress.c │ │ │ ├── table_layout.c │ │ │ ├── text_align.c │ │ │ ├── text_decoration.c │ │ │ ├── text_indent.c │ │ │ ├── text_transform.c │ │ │ ├── top.c │ │ │ ├── unicode_bidi.c │ │ │ ├── vertical_align.c │ │ │ ├── visibility.c │ │ │ ├── voice_family.c │ │ │ ├── volume.c │ │ │ ├── white_space.c │ │ │ ├── widows.c │ │ │ ├── width.c │ │ │ ├── word_spacing.c │ │ │ ├── writing_mode.c │ │ │ └── z_index.c │ │ ├── propget.h │ │ ├── propset.h │ │ ├── select.c │ │ ├── select.h │ │ ├── select_config.py │ │ ├── select_generator.py │ │ ├── strings.c │ │ ├── strings.h │ │ ├── unit.c │ │ └── unit.h │ │ ├── stylesheet.c │ │ ├── stylesheet.h │ │ └── utils │ │ ├── parserutilserror.h │ │ ├── utils.c │ │ └── utils.h ├── libdom │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── bindings │ │ ├── hubbub │ │ │ ├── CMakeLists.txt │ │ │ ├── README.md │ │ │ ├── parser.c │ │ │ └── utils.h │ │ └── xml │ │ │ ├── README.md │ │ │ ├── utils.h │ │ │ └── xmlparser.c │ ├── docs │ │ ├── RefCnt │ │ └── Todo │ ├── include │ │ └── dom │ │ │ ├── bindings │ │ │ ├── hubbub │ │ │ │ ├── errors.h │ │ │ │ └── parser.h │ │ │ └── xml │ │ │ │ ├── xmlerror.h │ │ │ │ └── xmlparser.h │ │ │ ├── core │ │ │ ├── attr.h │ │ │ ├── cdatasection.h │ │ │ ├── characterdata.h │ │ │ ├── comment.h │ │ │ ├── doc_fragment.h │ │ │ ├── document.h │ │ │ ├── document_type.h │ │ │ ├── element.h │ │ │ ├── entity_ref.h │ │ │ ├── exceptions.h │ │ │ ├── implementation.h │ │ │ ├── namednodemap.h │ │ │ ├── node.h │ │ │ ├── nodelist.h │ │ │ ├── pi.h │ │ │ ├── string.h │ │ │ ├── text.h │ │ │ ├── tokenlist.h │ │ │ └── typeinfo.h │ │ │ ├── dom.h │ │ │ ├── events │ │ │ ├── custom_event.h │ │ │ ├── document_event.h │ │ │ ├── event.h │ │ │ ├── event_listener.h │ │ │ ├── event_target.h │ │ │ ├── events.h │ │ │ ├── keyboard_event.h │ │ │ ├── mouse_event.h │ │ │ ├── mouse_multi_wheel_event.h │ │ │ ├── mouse_wheel_event.h │ │ │ ├── mutation_event.h │ │ │ ├── mutation_name_event.h │ │ │ ├── text_event.h │ │ │ └── ui_event.h │ │ │ ├── functypes.h │ │ │ ├── html │ │ │ ├── html_anchor_element.h │ │ │ ├── html_applet_element.h │ │ │ ├── html_area_element.h │ │ │ ├── html_base_element.h │ │ │ ├── html_basefont_element.h │ │ │ ├── html_body_element.h │ │ │ ├── html_br_element.h │ │ │ ├── html_button_element.h │ │ │ ├── html_canvas_element.h │ │ │ ├── html_collection.h │ │ │ ├── html_directory_element.h │ │ │ ├── html_div_element.h │ │ │ ├── html_dlist_element.h │ │ │ ├── html_document.h │ │ │ ├── html_element.h │ │ │ ├── html_elements.h │ │ │ ├── html_fieldset_element.h │ │ │ ├── html_font_element.h │ │ │ ├── html_form_element.h │ │ │ ├── html_frame_element.h │ │ │ ├── html_frameset_element.h │ │ │ ├── html_head_element.h │ │ │ ├── html_heading_element.h │ │ │ ├── html_hr_element.h │ │ │ ├── html_html_element.h │ │ │ ├── html_iframe_element.h │ │ │ ├── html_image_element.h │ │ │ ├── html_input_element.h │ │ │ ├── html_isindex_element.h │ │ │ ├── html_label_element.h │ │ │ ├── html_legend_element.h │ │ │ ├── html_li_element.h │ │ │ ├── html_link_element.h │ │ │ ├── html_map_element.h │ │ │ ├── html_menu_element.h │ │ │ ├── html_meta_element.h │ │ │ ├── html_mod_element.h │ │ │ ├── html_object_element.h │ │ │ ├── html_olist_element.h │ │ │ ├── html_opt_group_element.h │ │ │ ├── html_option_element.h │ │ │ ├── html_options_collection.h │ │ │ ├── html_paragraph_element.h │ │ │ ├── html_param_element.h │ │ │ ├── html_pre_element.h │ │ │ ├── html_quote_element.h │ │ │ ├── html_script_element.h │ │ │ ├── html_select_element.h │ │ │ ├── html_style_element.h │ │ │ ├── html_table_element.h │ │ │ ├── html_tablecaption_element.h │ │ │ ├── html_tablecell_element.h │ │ │ ├── html_tablecol_element.h │ │ │ ├── html_tablerow_element.h │ │ │ ├── html_tablesection_element.h │ │ │ ├── html_text_area_element.h │ │ │ ├── html_title_element.h │ │ │ └── html_ulist_element.h │ │ │ ├── inttypes.h │ │ │ └── walk.h │ └── src │ │ ├── core │ │ ├── attr.c │ │ ├── attr.h │ │ ├── cdatasection.c │ │ ├── cdatasection.h │ │ ├── characterdata.c │ │ ├── characterdata.h │ │ ├── comment.c │ │ ├── comment.h │ │ ├── doc_fragment.c │ │ ├── doc_fragment.h │ │ ├── document.c │ │ ├── document.h │ │ ├── document_type.c │ │ ├── document_type.h │ │ ├── element.c │ │ ├── element.h │ │ ├── entity_ref.c │ │ ├── entity_ref.h │ │ ├── implementation.c │ │ ├── namednodemap.c │ │ ├── namednodemap.h │ │ ├── node.c │ │ ├── node.h │ │ ├── nodelist.c │ │ ├── nodelist.h │ │ ├── pi.c │ │ ├── pi.h │ │ ├── string.c │ │ ├── string.h │ │ ├── text.c │ │ ├── text.h │ │ ├── tokenlist.c │ │ └── tokenlist.h │ │ ├── events │ │ ├── custom_event.c │ │ ├── custom_event.h │ │ ├── dispatch.c │ │ ├── dispatch.h │ │ ├── document_event.c │ │ ├── document_event.h │ │ ├── event.c │ │ ├── event.h │ │ ├── event_listener.c │ │ ├── event_listener.h │ │ ├── event_target.c │ │ ├── event_target.h │ │ ├── keyboard_event.c │ │ ├── keyboard_event.h │ │ ├── mouse_event.c │ │ ├── mouse_event.h │ │ ├── mouse_multi_wheel_event.c │ │ ├── mouse_multi_wheel_event.h │ │ ├── mouse_wheel_event.c │ │ ├── mouse_wheel_event.h │ │ ├── mutation_event.c │ │ ├── mutation_event.h │ │ ├── mutation_name_event.c │ │ ├── mutation_name_event.h │ │ ├── text_event.c │ │ ├── text_event.h │ │ ├── ui_event.c │ │ └── ui_event.h │ │ ├── html │ │ ├── TODO │ │ ├── html_anchor_element.c │ │ ├── html_anchor_element.h │ │ ├── html_applet_element.c │ │ ├── html_applet_element.h │ │ ├── html_area_element.c │ │ ├── html_area_element.h │ │ ├── html_base_element.c │ │ ├── html_base_element.h │ │ ├── html_basefont_element.c │ │ ├── html_basefont_element.h │ │ ├── html_body_element.c │ │ ├── html_body_element.h │ │ ├── html_br_element.c │ │ ├── html_br_element.h │ │ ├── html_button_element.c │ │ ├── html_button_element.h │ │ ├── html_canvas_element.c │ │ ├── html_canvas_element.h │ │ ├── html_collection.c │ │ ├── html_collection.h │ │ ├── html_directory_element.c │ │ ├── html_directory_element.h │ │ ├── html_div_element.c │ │ ├── html_div_element.h │ │ ├── html_dlist_element.c │ │ ├── html_dlist_element.h │ │ ├── html_document.c │ │ ├── html_document.h │ │ ├── html_document_strings.h │ │ ├── html_element.c │ │ ├── html_element.h │ │ ├── html_fieldset_element.c │ │ ├── html_fieldset_element.h │ │ ├── html_font_element.c │ │ ├── html_font_element.h │ │ ├── html_form_element.c │ │ ├── html_form_element.h │ │ ├── html_frame_element.c │ │ ├── html_frame_element.h │ │ ├── html_frameset_element.c │ │ ├── html_frameset_element.h │ │ ├── html_head_element.c │ │ ├── html_head_element.h │ │ ├── html_heading_element.c │ │ ├── html_heading_element.h │ │ ├── html_hr_element.c │ │ ├── html_hr_element.h │ │ ├── html_html_element.c │ │ ├── html_html_element.h │ │ ├── html_iframe_element.c │ │ ├── html_iframe_element.h │ │ ├── html_image_element.c │ │ ├── html_image_element.h │ │ ├── html_input_element.c │ │ ├── html_input_element.h │ │ ├── html_isindex_element.c │ │ ├── html_isindex_element.h │ │ ├── html_label_element.c │ │ ├── html_label_element.h │ │ ├── html_legend_element.c │ │ ├── html_legend_element.h │ │ ├── html_li_element.c │ │ ├── html_li_element.h │ │ ├── html_link_element.c │ │ ├── html_link_element.h │ │ ├── html_map_element.c │ │ ├── html_map_element.h │ │ ├── html_menu_element.c │ │ ├── html_menu_element.h │ │ ├── html_meta_element.c │ │ ├── html_meta_element.h │ │ ├── html_mod_element.c │ │ ├── html_mod_element.h │ │ ├── html_object_element.c │ │ ├── html_object_element.h │ │ ├── html_olist_element.c │ │ ├── html_olist_element.h │ │ ├── html_opt_group_element.c │ │ ├── html_opt_group_element.h │ │ ├── html_option_element.c │ │ ├── html_option_element.h │ │ ├── html_options_collection.c │ │ ├── html_options_collection.h │ │ ├── html_paragraph_element.c │ │ ├── html_paragraph_element.h │ │ ├── html_param_element.c │ │ ├── html_param_element.h │ │ ├── html_pre_element.c │ │ ├── html_pre_element.h │ │ ├── html_quote_element.c │ │ ├── html_quote_element.h │ │ ├── html_script_element.c │ │ ├── html_script_element.h │ │ ├── html_select_element.c │ │ ├── html_select_element.h │ │ ├── html_style_element.c │ │ ├── html_style_element.h │ │ ├── html_table_element.c │ │ ├── html_table_element.h │ │ ├── html_tablecaption_element.c │ │ ├── html_tablecaption_element.h │ │ ├── html_tablecell_element.c │ │ ├── html_tablecell_element.h │ │ ├── html_tablecol_element.c │ │ ├── html_tablecol_element.h │ │ ├── html_tablerow_element.c │ │ ├── html_tablerow_element.h │ │ ├── html_tablesection_element.c │ │ ├── html_tablesection_element.h │ │ ├── html_text_area_element.c │ │ ├── html_text_area_element.h │ │ ├── html_title_element.c │ │ ├── html_title_element.h │ │ ├── html_ulist_element.c │ │ └── html_ulist_element.h │ │ └── utils │ │ ├── character_valid.c │ │ ├── character_valid.h │ │ ├── list.h │ │ ├── namespace.c │ │ ├── namespace.h │ │ ├── utils.h │ │ ├── validate.c │ │ ├── validate.h │ │ └── walk.c ├── libhubbub │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── docs │ │ ├── Architecture │ │ ├── Macros │ │ ├── Todo │ │ └── Treebuilder │ ├── include │ │ └── hubbub │ │ │ ├── errors.h │ │ │ ├── functypes.h │ │ │ ├── hubbub.h │ │ │ ├── parser.h │ │ │ ├── tree.h │ │ │ └── types.h │ └── src │ │ ├── charset │ │ ├── detect.c │ │ └── detect.h │ │ ├── parser.c │ │ ├── tokeniser │ │ ├── entities.c │ │ ├── entities.h │ │ ├── entities.inc │ │ ├── tokeniser.c │ │ └── tokeniser.h │ │ ├── treebuilder │ │ ├── after_after_body.c │ │ ├── after_after_frameset.c │ │ ├── after_body.c │ │ ├── after_frameset.c │ │ ├── after_head.c │ │ ├── before_head.c │ │ ├── before_html.c │ │ ├── element-type.c │ │ ├── element-type.gperf │ │ ├── element-type.h │ │ ├── generic_rcdata.c │ │ ├── in_body.c │ │ ├── in_caption.c │ │ ├── in_cell.c │ │ ├── in_column_group.c │ │ ├── in_foreign_content.c │ │ ├── in_frameset.c │ │ ├── in_head.c │ │ ├── in_head_noscript.c │ │ ├── in_row.c │ │ ├── in_select.c │ │ ├── in_select_in_table.c │ │ ├── in_table.c │ │ ├── in_table_body.c │ │ ├── initial.c │ │ ├── internal.h │ │ ├── modes.h │ │ ├── treebuilder.c │ │ └── treebuilder.h │ │ └── utils │ │ ├── parserutilserror.h │ │ ├── string.c │ │ ├── string.h │ │ └── utils.h ├── libnsbmp │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── include │ │ └── libnsbmp.h │ ├── meson.build │ └── src │ │ ├── libnsbmp.c │ │ └── utils │ │ └── log.h ├── libnsgif │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── include │ │ └── nsgif.h │ ├── meson.build │ └── src │ │ ├── gif.c │ │ ├── lzw.c │ │ ├── lzw.h │ │ └── utils │ │ └── log.h ├── libnsutils │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── README.wapcaplet.md │ ├── include │ │ ├── libwapcaplet │ │ │ └── libwapcaplet.h │ │ └── nsutils │ │ │ ├── assert.h │ │ │ ├── base64.h │ │ │ ├── endian.h │ │ │ ├── errors.h │ │ │ ├── time.h │ │ │ └── unistd.h │ ├── meson.build │ └── src │ │ ├── base64.c │ │ ├── libwapcaplet.c │ │ ├── time.c │ │ └── unistd.c ├── libparserutils │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── docs │ │ └── Todo │ ├── include │ │ └── parserutils │ │ │ ├── charset │ │ │ ├── codec.h │ │ │ ├── mibenum.h │ │ │ ├── utf16.h │ │ │ └── utf8.h │ │ │ ├── errors.h │ │ │ ├── functypes.h │ │ │ ├── input │ │ │ └── inputstream.h │ │ │ ├── parserutils.h │ │ │ ├── types.h │ │ │ └── utils │ │ │ ├── buffer.h │ │ │ ├── stack.h │ │ │ └── vector.h │ ├── meson.build │ └── src │ │ ├── charset │ │ ├── aliases.c │ │ ├── aliases.h │ │ ├── aliases.inc │ │ └── encodings │ │ │ ├── utf8.c │ │ │ └── utf8impl.h │ │ ├── input │ │ ├── filter.c │ │ ├── filter.h │ │ └── inputstream.c │ │ └── utils │ │ ├── buffer.c │ │ ├── endian.h │ │ ├── stack.c │ │ ├── utils.h │ │ └── vector.c ├── libsvgtiny │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── include │ │ └── svgtiny.h │ └── src │ │ ├── colors.gperf │ │ ├── svgtiny.c │ │ ├── svgtiny_gradient.c │ │ ├── svgtiny_internal.h │ │ ├── svgtiny_list.c │ │ └── svgtiny_strings.h ├── meson.build └── nsgenbind │ ├── CMakeLists.txt │ ├── COPYING.netsurf │ ├── README.md │ ├── docs │ ├── example.bnd │ └── mainpage.md │ └── src │ ├── duk-libdom-common.c │ ├── duk-libdom-dictionary.c │ ├── duk-libdom-generated.c │ ├── duk-libdom-interface.c │ ├── duk-libdom.c │ ├── duk-libdom.h │ ├── ir.c │ ├── ir.h │ ├── jsapi-libdom.h │ ├── nsgenbind-ast.c │ ├── nsgenbind-ast.h │ ├── nsgenbind-lexer.l │ ├── nsgenbind-parser.y │ ├── nsgenbind.c │ ├── options.h │ ├── output.c │ ├── output.h │ ├── utils.c │ ├── utils.h │ ├── webidl-ast.c │ ├── webidl-ast.h │ ├── webidl-lexer.l │ └── webidl-parser.y ├── frontends ├── CMakeLists.txt ├── gtk │ ├── CMakeLists.txt │ ├── about.c │ ├── about.h │ ├── accelerator.c │ ├── accelerator.h │ ├── bitmap.c │ ├── bitmap.h │ ├── compat.c │ ├── compat.h │ ├── completion.c │ ├── completion.h │ ├── cookies.c │ ├── cookies.h │ ├── corewindow.c │ ├── corewindow.h │ ├── download.c │ ├── download.h │ ├── fetch.c │ ├── fetch.h │ ├── gdk.c │ ├── gdk.h │ ├── global_history.c │ ├── global_history.h │ ├── gui.c │ ├── gui.h │ ├── hotlist.c │ ├── hotlist.h │ ├── layout_pango.c │ ├── layout_pango.h │ ├── local_history.c │ ├── local_history.h │ ├── menu.c │ ├── menu.h │ ├── misc.c │ ├── misc.h │ ├── options.h │ ├── page_info.c │ ├── page_info.h │ ├── plotters.c │ ├── plotters.h │ ├── preferences.c │ ├── preferences.h │ ├── print.c │ ├── print.h │ ├── res │ │ ├── Messages │ │ ├── accelerators │ │ ├── adblock.css │ │ ├── cookies.ui │ │ ├── credits.html │ │ ├── default.css │ │ ├── default.ico │ │ ├── downloads.ui │ │ ├── favicon.png │ │ ├── globalhistory.ui │ │ ├── hotlist.ui │ │ ├── icons │ │ ├── internal.css │ │ ├── languages │ │ ├── license.html │ │ ├── localhistory.ui │ │ ├── menu_cursor.png │ │ ├── menu_cursor.xbm │ │ ├── menu_cursor_mask.xbm │ │ ├── menu_cursor_mask.xpm │ │ ├── messages.gresource.xml │ │ ├── neosurf-16x16.xpm │ │ ├── neosurf-gtk.desktop │ │ ├── neosurf.gresource.xml │ │ ├── neosurf.png │ │ ├── neosurf.ui │ │ ├── neosurf.xpm │ │ ├── options.ui │ │ ├── pageinfo.ui │ │ ├── password.ui │ │ ├── tabcontents.ui │ │ ├── throbber │ │ │ ├── throbber0.png │ │ │ ├── throbber1.png │ │ │ ├── throbber2.png │ │ │ ├── throbber3.png │ │ │ ├── throbber4.png │ │ │ ├── throbber5.png │ │ │ ├── throbber6.png │ │ │ ├── throbber7.png │ │ │ └── throbber8.png │ │ ├── toolbar.ui │ │ ├── ui.gresource.xml │ │ ├── viewdata.ui │ │ ├── warning.ui │ │ └── welcome.html │ ├── resources.c │ ├── resources.h │ ├── scaffolding.c │ ├── scaffolding.h │ ├── schedule.c │ ├── schedule.h │ ├── search.c │ ├── search.h │ ├── selection.c │ ├── selection.h │ ├── sexy_icon_entry.c │ ├── sexy_icon_entry.h │ ├── tabs.c │ ├── tabs.h │ ├── throbber.c │ ├── throbber.h │ ├── toolbar.c │ ├── toolbar.h │ ├── toolbar_items.h │ ├── viewdata.c │ ├── viewdata.h │ ├── viewsource.c │ ├── viewsource.h │ ├── warn.h │ ├── window.c │ └── window.h └── visurf │ ├── CMakeLists.txt │ ├── bitmap.c │ ├── bitmap.h │ ├── commands.c │ ├── commands.h │ ├── fetch.c │ ├── fetch.h │ ├── getopt.c │ ├── getopt.h │ ├── keybindings.c │ ├── keybindings.h │ ├── layout.c │ ├── layout.h │ ├── main.c │ ├── options.h │ ├── plotters.c │ ├── plotters.h │ ├── pool-buffer.c │ ├── pool-buffer.h │ ├── res │ ├── settings.c │ ├── settings.h │ ├── timespec-util.h │ ├── undo.c │ ├── undo.h │ ├── urlfilter │ ├── visurf.h │ ├── window.c │ ├── window.h │ ├── xdg-decoration.c │ ├── xdg-decoration.h │ ├── xdg-shell.c │ └── xdg-shell.h ├── img ├── scr1.png └── scr2.png ├── include └── neosurf │ ├── bitmap.h │ ├── browser.h │ ├── browser_window.h │ ├── clipboard.h │ ├── console.h │ ├── content.h │ ├── content │ ├── backing_store.h │ ├── content.h │ ├── content_protected.h │ ├── fetch.h │ ├── handlers │ │ ├── css │ │ │ ├── css.h │ │ │ └── utils.h │ │ └── html │ │ │ ├── box.h │ │ │ ├── box_inspect.h │ │ │ ├── form_internal.h │ │ │ ├── html.h │ │ │ ├── html_save.h │ │ │ ├── interaction.h │ │ │ └── private.h │ ├── hlcache.h │ └── llcache.h │ ├── content_type.h │ ├── cookie_db.h │ ├── core_window.h │ ├── css.h │ ├── desktop │ ├── browser_history.h │ ├── cookie_manager.h │ ├── download.h │ ├── frame_types.h │ ├── global_history.h │ ├── gui_internal.h │ ├── gui_table.h │ ├── hotlist.h │ ├── local_history.h │ ├── options.h │ ├── page-info.h │ ├── print.h │ ├── printer.h │ ├── save_complete.h │ ├── save_pdf.h │ ├── save_text.h │ ├── search.h │ ├── searchweb.h │ ├── textarea.h │ ├── textinput.h │ └── version.h │ ├── download.h │ ├── fetch.h │ ├── form.h │ ├── inttypes.h │ ├── keypress.h │ ├── layout.h │ ├── misc.h │ ├── mouse.h │ ├── neosurf.h │ ├── plot_style.h │ ├── plotters.h │ ├── search.h │ ├── ssl_certs.h │ ├── types.h │ ├── url_db.h │ ├── utf8.h │ ├── utils │ ├── ascii.h │ ├── config.h │ ├── corestringlist.h │ ├── corestrings.h │ ├── errors.h │ ├── file.h │ ├── filepath.h │ ├── hashtable.h │ ├── inet.h │ ├── log.h │ ├── messages.h │ ├── nsoption.h │ ├── nsurl.h │ ├── string.h │ ├── utf8.h │ └── utils.h │ └── window.h ├── meson.build ├── neosurf_version └── src ├── CMakeLists.txt ├── COPYING.netsurf ├── content ├── content.c ├── content_debug.h ├── content_factory.c ├── content_factory.h ├── fetch.c ├── fetchers.h ├── fetchers │ ├── about │ │ ├── about.c │ │ ├── about.h │ │ ├── blank.c │ │ ├── blank.h │ │ ├── certificate.c │ │ ├── certificate.h │ │ ├── chart.c │ │ ├── chart.h │ │ ├── config.c │ │ ├── config.h │ │ ├── imagecache.c │ │ ├── imagecache.h │ │ ├── nscolours.c │ │ ├── nscolours.h │ │ ├── private.h │ │ ├── query.c │ │ ├── query.h │ │ ├── query_auth.c │ │ ├── query_auth.h │ │ ├── query_fetcherror.c │ │ ├── query_fetcherror.h │ │ ├── query_privacy.c │ │ ├── query_privacy.h │ │ ├── query_timeout.c │ │ └── query_timeout.h │ ├── curl.c │ ├── curl.h │ ├── data.c │ ├── data.h │ ├── file │ │ ├── dirlist.c │ │ ├── dirlist.h │ │ ├── file.c │ │ └── file.h │ ├── resource.c │ └── resource.h ├── fs_backing_store.c ├── handlers │ ├── css │ │ ├── css.c │ │ ├── dump.c │ │ ├── dump.h │ │ ├── hints.c │ │ ├── hints.h │ │ ├── internal.c │ │ ├── internal.h │ │ ├── select.c │ │ └── select.h │ ├── html │ │ ├── box_construct.c │ │ ├── box_construct.h │ │ ├── box_inspect.c │ │ ├── box_manipulate.c │ │ ├── box_manipulate.h │ │ ├── box_normalise.c │ │ ├── box_normalise.h │ │ ├── box_special.c │ │ ├── box_special.h │ │ ├── box_textarea.c │ │ ├── box_textarea.h │ │ ├── css.c │ │ ├── css.h │ │ ├── css_fetcher.c │ │ ├── dom_event.c │ │ ├── dom_event.h │ │ ├── font.c │ │ ├── font.h │ │ ├── form.c │ │ ├── forms.c │ │ ├── html.c │ │ ├── imagemap.c │ │ ├── imagemap.h │ │ ├── interaction.c │ │ ├── layout.c │ │ ├── layout.h │ │ ├── layout_flex.c │ │ ├── layout_internal.h │ │ ├── object.c │ │ ├── object.h │ │ ├── redraw.c │ │ ├── redraw_border.c │ │ ├── script.c │ │ ├── table.c │ │ ├── table.h │ │ ├── textselection.c │ │ └── textselection.h │ ├── image │ │ ├── bmp.c │ │ ├── bmp.h │ │ ├── gif.c │ │ ├── gif.h │ │ ├── ico.c │ │ ├── ico.h │ │ ├── image.c │ │ ├── image.h │ │ ├── image_cache.c │ │ ├── image_cache.h │ │ ├── jpeg.c │ │ ├── jpeg.h │ │ ├── png.c │ │ ├── png.h │ │ ├── svg.c │ │ ├── svg.h │ │ ├── video.c │ │ ├── video.h │ │ ├── webp.c │ │ └── webp.h │ ├── javascript │ │ ├── WebIDL │ │ │ ├── console.idl │ │ │ ├── cssom.idl │ │ │ ├── dom-parsing.idl │ │ │ ├── dom.idl │ │ │ ├── html.idl │ │ │ ├── uievents.idl │ │ │ └── urlutils.idl │ │ ├── content.c │ │ ├── content.h │ │ ├── duktape │ │ │ ├── CSSRule.bnd │ │ │ ├── CSSStyleSheet.bnd │ │ │ ├── CanvasRenderingContext2D.bnd │ │ │ ├── Console.bnd │ │ │ ├── DOMImplementation.bnd │ │ │ ├── DOMSettableTokenList.bnd │ │ │ ├── DOMTokenList.bnd │ │ │ ├── Document.bnd │ │ │ ├── Element.bnd │ │ │ ├── Event.bnd │ │ │ ├── EventTarget.bnd │ │ │ ├── HTMLAnchorElement.bnd │ │ │ ├── HTMLAppletElement.bnd │ │ │ ├── HTMLAreaElement.bnd │ │ │ ├── HTMLBRElement.bnd │ │ │ ├── HTMLBaseElement.bnd │ │ │ ├── HTMLBodyElement.bnd │ │ │ ├── HTMLButtonElement.bnd │ │ │ ├── HTMLCanvasElement.bnd │ │ │ ├── HTMLCollection.bnd │ │ │ ├── HTMLDivElement.bnd │ │ │ ├── HTMLElement.bnd │ │ │ ├── HTMLFontElement.bnd │ │ │ ├── HTMLFormElement.bnd │ │ │ ├── HTMLFrameElement.bnd │ │ │ ├── HTMLFrameSetElement.bnd │ │ │ ├── HTMLHRElement.bnd │ │ │ ├── HTMLHTMLElement.bnd │ │ │ ├── HTMLHeadingElement.bnd │ │ │ ├── HTMLIFrameElement.bnd │ │ │ ├── HTMLImageElement.bnd │ │ │ ├── HTMLInputElement.bnd │ │ │ ├── HTMLLIElement.bnd │ │ │ ├── HTMLLabelElement.bnd │ │ │ ├── HTMLLegendElement.bnd │ │ │ ├── HTMLLinkElement.bnd │ │ │ ├── HTMLMapElement.bnd │ │ │ ├── HTMLMarqueeElement.bnd │ │ │ ├── HTMLMenuElement.bnd │ │ │ ├── HTMLMetaElement.bnd │ │ │ ├── HTMLOListElement.bnd │ │ │ ├── HTMLObjectElement.bnd │ │ │ ├── HTMLOptionElement.bnd │ │ │ ├── HTMLParagraphElement.bnd │ │ │ ├── HTMLParamElement.bnd │ │ │ ├── HTMLPreElement.bnd │ │ │ ├── HTMLQuoteElement.bnd │ │ │ ├── HTMLScriptElement.bnd │ │ │ ├── HTMLSelectElement.bnd │ │ │ ├── HTMLStyleElement.bnd │ │ │ ├── HTMLTableCaptionElement.bnd │ │ │ ├── HTMLTableCellElement.bnd │ │ │ ├── HTMLTableColElement.bnd │ │ │ ├── HTMLTableElement.bnd │ │ │ ├── HTMLTableRowElement.bnd │ │ │ ├── HTMLTableSectionElement.bnd │ │ │ ├── HTMLTextAreaElement.bnd │ │ │ ├── HTMLTitleElement.bnd │ │ │ ├── ImageData.bnd │ │ │ ├── KeyboardEvent.bnd │ │ │ ├── Location.bnd │ │ │ ├── NamedNodeMap.bnd │ │ │ ├── Navigator.bnd │ │ │ ├── Node.bnd │ │ │ ├── NodeList.bnd │ │ │ ├── Window.bnd │ │ │ ├── duk_config.h │ │ │ ├── duk_custom.h │ │ │ ├── dukky.c │ │ │ ├── dukky.h │ │ │ ├── duktape.c │ │ │ ├── duktape.h │ │ │ ├── generics.js │ │ │ ├── generics.js.inc │ │ │ ├── neosurf.bnd │ │ │ ├── polyfill.js │ │ │ └── polyfill.js.inc │ │ ├── fetcher.c │ │ ├── fetcher.h │ │ └── js.h │ └── text │ │ ├── textplain.c │ │ └── textplain.h ├── hlcache.c ├── llcache.c ├── mimesniff.c ├── mimesniff.h ├── no_backing_store.c ├── textsearch.c ├── textsearch.h ├── urldb.c └── urldb.h ├── desktop ├── bitmap.c ├── bitmap.h ├── browser.c ├── browser_history.c ├── browser_private.h ├── browser_window.c ├── cookie_manager.c ├── cw_helper.c ├── cw_helper.h ├── download.c ├── frames.c ├── frames.h ├── global_history.c ├── gui_factory.c ├── hotlist.c ├── knockout.c ├── knockout.h ├── local_history.c ├── local_history_private.h ├── neosurf.c ├── page-info.c ├── plot_style.c ├── print.c ├── save_complete.c ├── save_pdf.c ├── save_text.c ├── scrollbar.c ├── scrollbar.h ├── search.c ├── searchweb.c ├── selection.c ├── selection.h ├── system_colour.c ├── system_colour.h ├── textarea.c ├── textinput.c ├── theme.h ├── treeview.c ├── treeview.h └── version.c ├── docs ├── UnimplementedJavascript.md ├── core-window-interface.md ├── development.md ├── ideas │ ├── cache.txt │ ├── css-engine.txt │ └── render-library.txt ├── implementing-new-frontend.md ├── jsbinding.md ├── logging.md ├── netsurf-gtk.1 ├── netsurf-options.md ├── source-object-backing-store.md ├── updating-duktape.md └── user-interface.md ├── meson.build ├── resources ├── FatMessages ├── SearchEngines ├── adblock.css ├── ca-bundle ├── credits.html ├── default.css ├── favicon.png ├── icons │ ├── 16x16 │ │ └── actions │ │ │ ├── page-info-insecure.png │ │ │ ├── page-info-internal.png │ │ │ ├── page-info-local.png │ │ │ ├── page-info-secure.png │ │ │ └── page-info-warning.png │ ├── 24x24 │ │ └── actions │ │ │ ├── page-info-insecure.png │ │ │ ├── page-info-internal.png │ │ │ ├── page-info-local.png │ │ │ ├── page-info-secure.png │ │ │ └── page-info-warning.png │ ├── 48x48 │ │ └── actions │ │ │ ├── page-info-insecure.png │ │ │ ├── page-info-internal.png │ │ │ ├── page-info-local.png │ │ │ ├── page-info-secure.png │ │ │ └── page-info-warning.png │ ├── arrow-l.png │ ├── content.png │ ├── directory.png │ ├── directory2.png │ ├── hotlist-add.png │ ├── hotlist-rmv.png │ ├── local-history.png │ ├── page-info-insecure.svg │ ├── page-info-internal.svg │ ├── page-info-local.svg │ ├── page-info-secure.svg │ ├── page-info-warning.svg │ ├── search.png │ └── show-cookie.png ├── internal.css ├── license.html ├── neosurf.png └── welcome.html └── utils ├── bloom.c ├── bloom.h ├── corestrings.c ├── dirent.h ├── file.c ├── filepath.c ├── hashmap.c ├── hashmap.h ├── hashtable.c ├── http.h ├── http ├── cache-control.c ├── cache-control.h ├── content-disposition.c ├── content-disposition.h ├── content-type.c ├── content-type.h ├── generics.c ├── generics.h ├── parameter.c ├── parameter.h ├── parameter_internal.h ├── primitives.c ├── primitives.h ├── strict-transport-security.c └── strict-transport-security.h ├── idna.c ├── idna.h ├── idna_props.h ├── libdom.c ├── libdom.h ├── log.c ├── messages.c ├── nscolour.c ├── nscolour.h ├── nsoption.c ├── nsurl ├── nsurl.c ├── parse.c └── private.h ├── punycode.c ├── punycode.h ├── regex.h ├── ring.h ├── ssl_certs.c ├── sys_time.h ├── talloc.c ├── talloc.h ├── time.c ├── time.h ├── url.c ├── url.h ├── useragent.c ├── useragent.h ├── utf8.c ├── utils.c └── utsname.h /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to NeoSurf 2 | 3 | This file is currently a work in progress. 4 | 5 | ## Styling 6 | * For sake of conformity, please use proper tab characters instead of 4 or 8 spaces for indentation. 7 | * Ensure lines are not longer than 80 characters. 8 | 9 | ## Macros 10 | NeoSurf takes a strict stance on macro usage. Preprocessor macros should be entirely avoided, except: 11 | * Including header files (obviously) 12 | * #pragma once 13 | * #if, #elif, #else for disabling or enabling certain sections of code depending on the build configuration 14 | This means that constants or what can be implemented using macros should always be done so as proper C code. Do note that some legacy NetSurf code included in this repository contains complex macros. 15 | The reason for this stance is that heavy macro usage can drastically hinder code understandability, which is an issue that often manifests in the codebases of other large C projects. 16 | -------------------------------------------------------------------------------- /appimage/AppRun-gtk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | NEOSURFRES="${APPDIR}/usr/share/neosurf-gtk" LD_LIBRARY_PATH="${APPDIR}/usr/lib" exec "${APPDIR}/usr/bin/neosurf-gtk" 4 | -------------------------------------------------------------------------------- /appimage/AppRun-vi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | NEOSURFRES="${APPDIR}/usr/share/neosurf-gtk" LD_LIBRARY_PATH="${APPDIR}/usr/lib" exec "${APPDIR}/usr/bin/neosurf-vi" 4 | -------------------------------------------------------------------------------- /appimage/mkappimage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # All this does currently is create a basic file structure for AppImages 4 | 5 | TMPDIR_GTK=$(mktemp -dp "$PWD" tmp.gtk.XXXXXX) 6 | TMPDIR_VI=$(mktemp -dp "$PWD" tmp.vi.XXXXXX) 7 | 8 | cp -v neosurf-gtk.desktop "$TMPDIR_GTK" 9 | cp -v neosurf-vi.desktop "$TMPDIR_VI" 10 | 11 | cp -v AppRun-gtk "$TMPDIR_GTK/AppRun" 12 | cp -v AppRun-vi "$TMPDIR_VI/AppRun" 13 | 14 | cp -v neosurf.png "$TMPDIR_GTK" 15 | cp -v neosurf.png "$TMPDIR_VI" 16 | 17 | #TODO bundle libpsl, openssl 18 | -------------------------------------------------------------------------------- /appimage/neosurf-gtk.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=NeoSurf-GTK 3 | Exec=neosurf-gtk 4 | Type=Application 5 | Categories=Utility; 6 | Icon=neosurf 7 | -------------------------------------------------------------------------------- /appimage/neosurf-vi.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=ViSurf 3 | Exec=neosurf-vi 4 | Type=Application 5 | Categories=Utility; 6 | Icon=neosurf 7 | -------------------------------------------------------------------------------- /appimage/neosurf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/appimage/neosurf.png -------------------------------------------------------------------------------- /contrib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(libcss) 2 | add_subdirectory(libdom) 3 | add_subdirectory(libhubbub) 4 | add_subdirectory(libnsbmp) 5 | add_subdirectory(libnsgif) 6 | add_subdirectory(libnsutils) 7 | add_subdirectory(libparserutils) 8 | add_subdirectory(libsvgtiny) 9 | # nsgenbind is built separately 10 | -------------------------------------------------------------------------------- /contrib/libcss/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright (C) 2007 J-M Bell 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | * The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /contrib/libcss/README.md: -------------------------------------------------------------------------------- 1 | # LibCSS 2 | 3 | LibCSS is a CSS parser and selection engine. It aims to parse the forward compatible CSS grammar. 4 | 5 | ## API documentation 6 | Currently, there is none. However, the code is well commented and the public API may be found in the "include" directory. 7 | -------------------------------------------------------------------------------- /contrib/libcss/docs/Colour: -------------------------------------------------------------------------------- 1 | The exported representation of colours is an unsigned 32bit value in host order 2 | 3 | The value is divided into four 8bit channels. These are: 4 | 5 | Bits Name Desciption 6 | 0-7 Blue The blue intensity of the colour 0 is off 0xff is fully on 7 | 8-15 Green The green intensity of the colour 0 is off 0xff is fully on 8 | 16-23 Red The red intensity of the colour 0 is off 0xff is fully on 9 | 24-31 Alpha The Alpha component represents the opacity of the colour 0 is fully transparent and 0xff is opaque 10 | 11 | -------------------------------------------------------------------------------- /contrib/libcss/docs/Lexer: -------------------------------------------------------------------------------- 1 | Lexical analyser 2 | ================ 3 | 4 | This document contains various snippets of information about the lexer 5 | implementation. 6 | 7 | First sets 8 | ---------- 9 | 10 | IDENT [a-zA-Z] | '-' | '_' | [^#x0-#x7F] | '\' 11 | ATKEYWORD '@' 12 | STRING '"' | "'" 13 | INVALID_STRING '"' | "'" 14 | HASH '#' 15 | NUMBER [0-9] | '.' | '-' | '+' 16 | PERCENTAGE [0-9] | '.' | '-' | '+' 17 | DIMENSION [0-9] | '.' 18 | URI [Uu] 19 | UNICODE-RANGE [Uu] 20 | CDO '<' 21 | CDC '-' 22 | S #x9 | #xA | #xC | #xD | #x20 23 | COMMENT '/' 24 | FUNCTION [a-zA-Z] | '-' | '_' | [^#x0-#x7F] | '\' 25 | INCLUDES '~' 26 | DASHMATCH '|' 27 | PREFIXMATCH '^' 28 | SUFFIXMATCH '$' 29 | SUBSTRINGMATCH '*' 30 | CHAR anything except " or ' 31 | 32 | -------------------------------------------------------------------------------- /contrib/libcss/include/libcss/errors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef libcss_errors_h_ 9 | #define libcss_errors_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | 18 | typedef enum css_error { 19 | CSS_OK = 0, 20 | 21 | CSS_NOMEM = 1, 22 | CSS_BADPARM = 2, 23 | CSS_INVALID = 3, 24 | CSS_FILENOTFOUND = 4, 25 | CSS_NEEDDATA = 5, 26 | CSS_BADCHARSET = 6, 27 | CSS_EOF = 7, 28 | CSS_IMPORTS_PENDING = 8, 29 | CSS_PROPERTY_NOT_SET = 9 30 | } css_error; 31 | 32 | /* Convert a libcss error value to a string */ 33 | const char *css_error_to_string(css_error error); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /contrib/libcss/include/libcss/functypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007-8 John-Mark Bell 6 | */ 7 | 8 | #ifndef libcss_functypes_h_ 9 | #define libcss_functypes_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /contrib/libcss/include/libcss/libcss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef libcss_h_ 9 | #define libcss_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /contrib/libcss/src/charset/detect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef css_charset_detect_h_ 9 | #define css_charset_detect_h_ 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | /* Extract a charset from a chunk of data */ 20 | parserutils_error css__charset_extract(const uint8_t *data, size_t len, 21 | uint16_t *mibenum, uint32_t *source); 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /contrib/libcss/src/parse/font_face.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2011 Things Made Out Of Other Things Ltd. 6 | * Written by James Montgomerie 7 | */ 8 | 9 | #ifndef css_parse_font_face_h_ 10 | #define css_parse_font_face_h_ 11 | 12 | #include 13 | 14 | #include "stylesheet.h" 15 | #include "lex/lex.h" 16 | #include "parse/language.h" 17 | 18 | css_error css__parse_font_descriptor(css_language *c, 19 | const css_token *descriptor, const parserutils_vector *vector, 20 | int *ctx, struct css_rule_font_face *rule); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /contrib/libcss/src/parse/important.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 John-Mark Bell 6 | */ 7 | 8 | #ifndef css_css__parse_important_h_ 9 | #define css_css__parse_important_h_ 10 | 11 | #include "stylesheet.h" 12 | #include "parse/language.h" 13 | 14 | css_error css__parse_important(css_language *c, 15 | const parserutils_vector *vector, int *ctx, 16 | uint8_t *result); 17 | 18 | void css__make_style_important(css_style *style); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /contrib/libcss/src/parse/properties/.gitignore: -------------------------------------------------------------------------------- 1 | autogenerated_*.c 2 | 3 | -------------------------------------------------------------------------------- /contrib/libcss/src/parse/properties/gen_parser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.20) 2 | project(gen_parser) 3 | 4 | add_executable(gen_parser 5 | css_property_parser_gen.c 6 | ) 7 | -------------------------------------------------------------------------------- /contrib/libcss/src/parse/properties/parser_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [[ ${#} -lt 3 ]]; then 4 | echo "Requires at least three arguments (output directory, gen_parser binary location, properties.gen location)" 5 | exit 1 6 | fi 7 | 8 | while read PROP; do 9 | if [[ ! "${PROP}" =~ '#' ]] && [[ ${#PROP} -ne 0 ]]; then 10 | P=$(echo "$PROP" | sed "s/:.*//") 11 | "${2}" -o "${1}/autogenerated_${P}.c" "${PROP}" 12 | fi 13 | done < "${3}" 14 | -------------------------------------------------------------------------------- /contrib/libcss/src/select/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | *.pyc 3 | 4 | -------------------------------------------------------------------------------- /contrib/libcss/src/select/arena.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * 6 | * Copyright 2015 Michael Drake 7 | */ 8 | 9 | #ifndef css_select_arena_h_ 10 | #define css_select_arena_h_ 11 | 12 | struct css_computed_style; 13 | 14 | /* 15 | * Add computed style to the style sharing arena, or exchange for existing 16 | * 17 | * This takes a computed style. Note that the original computed style 18 | * may be freed by this call and all future usage should be via the 19 | * updated computed style parameter. 20 | * 21 | * \params style The style to intern; possibly freed and updated 22 | * \return CSS_OK on success or appropriate error otherwise. 23 | */ 24 | enum css_error css__arena_intern_style(struct css_computed_style **style); 25 | 26 | /* 27 | * Remove a computed style from the style sharing arena 28 | * 29 | * \params style The style to remove from the style sharing arena 30 | * \return CSS_OK on success or appropriate error otherwise. 31 | */ 32 | enum css_error css__arena_remove_style(struct css_computed_style *style); 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /contrib/libcss/src/select/assets.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # This file is part of LibCSS. 4 | # Licensed under the MIT License, 5 | # http://www.opensource.org/licenses/mit-license.php 6 | # Copyright 2017 Lucas Neves 7 | 8 | copyright = '''\ 9 | /* 10 | * This file is part of LibCSS 11 | * Licensed under the MIT License, 12 | * http://www.opensource.org/licenses/mit-license.php 13 | * Copyright 2017 The NetSurf Project 14 | */ 15 | ''' 16 | 17 | assets = {} 18 | 19 | assets['computed.h'] = {} 20 | assets['computed.h']['header'] = copyright 21 | assets['computed.h']['footer'] = '' 22 | 23 | assets['propset.h'] = {} 24 | assets['propset.h']['header'] = copyright + ''' 25 | /** Default values are 'initial value', unless the property is inherited, 26 | * in which case it is 'inherit'. */''' 27 | assets['propset.h']['footer'] = '' 28 | 29 | assets['propget.h'] = {} 30 | assets['propget.h']['header'] = copyright 31 | assets['propget.h']['footer'] = '' 32 | 33 | -------------------------------------------------------------------------------- /contrib/libcss/src/select/dispatch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 John-Mark Bell 6 | */ 7 | 8 | #ifndef css_select_dispatch_h_ 9 | #define css_select_dispatch_h_ 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #include "stylesheet.h" 17 | #include "bytecode/bytecode.h" 18 | #include "select/select.h" 19 | 20 | extern struct prop_table { 21 | css_error (*cascade)(uint32_t opv, css_style *style, 22 | css_select_state *state); 23 | css_error (*set_from_hint)(const css_hint *hint, 24 | css_computed_style *style); 25 | css_error (*initial)(css_select_state *state); 26 | css_error (*copy)(const css_computed_style *from, 27 | css_computed_style *to); 28 | css_error (*compose)(const css_computed_style *parent, 29 | const css_computed_style *child, 30 | css_computed_style *result); 31 | unsigned int inherited; 32 | } prop_dispatch[CSS_N_PROPERTIES]; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /contrib/libcss/src/select/propget.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 John-Mark Bell 6 | */ 7 | 8 | #ifndef css_select_propget_h_ 9 | #define css_select_propget_h_ 10 | 11 | #include 12 | #include "computed.h" 13 | #include "autogenerated_propget.h" 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /contrib/libcss/src/select/propset.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 John-Mark Bell 6 | */ 7 | 8 | #ifndef css_select_propset_h_ 9 | #define css_select_propset_h_ 10 | 11 | #include 12 | 13 | #include 14 | #include "computed.h" 15 | #include "autogenerated_propset.h" 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /contrib/libcss/src/utils/parserutilserror.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibCSS. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef css_utils_parserutilserror_h_ 9 | #define css_utils_parserutilserror_h_ 10 | 11 | #include 12 | 13 | #include 14 | 15 | /** 16 | * Convert a ParserUtils error into a LibCSS error 17 | * 18 | * \param error The ParserUtils error to convert 19 | * \return The corresponding LibCSS error 20 | */ 21 | static inline css_error css_error_from_parserutils_error( 22 | parserutils_error error) 23 | { 24 | /* Currently, there's a 1:1 mapping, so we've nothing to do */ 25 | return (css_error) error; 26 | } 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /contrib/libdom/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright (C) 2007 J-M Bell 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | * The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /contrib/libdom/README.md: -------------------------------------------------------------------------------- 1 | # LibDOM 2 | 3 | LibDOM is an implementation of the W3C DOM API in C. 4 | 5 | ## API documentation 6 | Currently, there is none. However, the code is well commented and the public API may be found in the "include" directory. 7 | -------------------------------------------------------------------------------- /contrib/libdom/bindings/hubbub/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_policy(SET CMP0079 NEW) 2 | 3 | add_library(dom-hubbub-bindings SHARED 4 | parser.c 5 | ) 6 | 7 | target_link_libraries(dom-hubbub-bindings nsutils hubbub dom) 8 | 9 | install(TARGETS dom-hubbub-bindings DESTINATION ${CMAKE_INSTALL_LIBDIR}) 10 | 11 | include_directories(${CMAKE_SOURCE_DIR}/contrib/libdom/src) 12 | -------------------------------------------------------------------------------- /contrib/libdom/bindings/hubbub/README.md: -------------------------------------------------------------------------------- 1 | # Hubbub binding for libdom 2 | 3 | This is a wrapper around hubbub's parser API, to facilitate construction of a libdom DOM tree. The basic premise is that the wrapper intercepts the SAX-like events emitted by hubbub's tokeniser then builds a libdom DOM tree from them. 4 | 5 | -------------------------------------------------------------------------------- /contrib/libdom/bindings/hubbub/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_hubbub_utils_h_ 9 | #define dom_hubbub_utils_h_ 10 | 11 | #ifndef max 12 | #define max(a,b) ((a)>(b)?(a):(b)) 13 | #endif 14 | 15 | #ifndef min 16 | #define min(a,b) ((a)<(b)?(a):(b)) 17 | #endif 18 | 19 | #ifndef SLEN 20 | /* Calculate length of a string constant */ 21 | #define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */ 22 | #endif 23 | 24 | #ifndef UNUSED 25 | #define UNUSED(x) ((void)(x)) 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /contrib/libdom/bindings/xml/README.md: -------------------------------------------------------------------------------- 1 | # LibXML binding for libdom 2 | 3 | This is a wrapper around libxml's push parser API, to facilitate construction of a libdom DOM tree. The basic premise is that the wrapper intercepts the SAX events emitted by libxml's tokeniser then invokes libxml's own SAX handlers, wrapping the results up in libdom-specific data structures. 4 | 5 | The tree created is thus a tree of libdom nodes, each of which is linked to the libxml node that backs it. This allows the binding to process the DOM tree using libxml api, should it need to (e.g. for normalization purposes). 6 | 7 | -------------------------------------------------------------------------------- /contrib/libdom/bindings/xml/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef xml_utils_h_ 9 | #define xml_utils_h_ 10 | 11 | #ifndef max 12 | #define max(a,b) ((a)>(b)?(a):(b)) 13 | #endif 14 | 15 | #ifndef min 16 | #define min(a,b) ((a)<(b)?(a):(b)) 17 | #endif 18 | 19 | #ifndef SLEN 20 | /* Calculate length of a string constant */ 21 | #define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */ 22 | #endif 23 | 24 | #ifndef UNUSED 25 | #define UNUSED(x) ((void)(x)) 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /contrib/libdom/docs/Todo: -------------------------------------------------------------------------------- 1 | TODO list 2 | ========= 3 | 4 | + Fill out stub functions for DOM3 core 5 | + Rest of DOM level 3 6 | + DOM level 2 7 | + DOM level 1 8 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/bindings/xml/xmlerror.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef xml_xmlerror_h_ 9 | #define xml_xmlerror_h_ 10 | 11 | typedef enum { 12 | DOM_XML_OK = 0, 13 | 14 | DOM_XML_NOMEM = 1, 15 | 16 | DOM_XML_EXTERNAL_ERR = (1<<16), 17 | } dom_xml_error; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/bindings/xml/xmlparser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef xml_xmlparser_h_ 9 | #define xml_xmlparser_h_ 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | #include "xmlerror.h" 17 | 18 | typedef struct dom_xml_parser dom_xml_parser; 19 | 20 | /* Create an XML parser instance */ 21 | dom_xml_parser *dom_xml_parser_create(const char *enc, const char *int_enc, 22 | dom_msg msg, void *mctx, dom_document **document); 23 | 24 | /* Destroy an XML parser instance */ 25 | void dom_xml_parser_destroy(dom_xml_parser *parser); 26 | 27 | /* Parse a chunk of data */ 28 | dom_xml_error dom_xml_parser_parse_chunk(dom_xml_parser *parser, 29 | uint8_t *data, size_t len); 30 | 31 | /* Notify parser that datastream is empty */ 32 | dom_xml_error dom_xml_parser_completed(dom_xml_parser *parser); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/core/cdatasection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | 7 | #ifndef dom_core_cdatasection_h_ 8 | #define dom_core_cdatasection_h_ 9 | 10 | typedef struct dom_cdata_section dom_cdata_section; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/core/comment.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_core_comment_h_ 9 | #define dom_core_comment_h_ 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | typedef struct dom_comment dom_comment; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/core/doc_fragment.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | */ 6 | 7 | #ifndef dom_core_documentfragment_h_ 8 | #define dom_core_documentfragment_h_ 9 | 10 | typedef struct dom_document_fragment dom_document_fragment; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/core/entity_ref.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_core_entityreference_h_ 9 | #define dom_core_entityreference_h_ 10 | 11 | typedef struct dom_entity_reference dom_entity_reference; 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/core/nodelist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_core_nodelist_h_ 9 | #define dom_core_nodelist_h_ 10 | 11 | #include 12 | 13 | struct dom_node; 14 | 15 | typedef struct dom_nodelist dom_nodelist; 16 | 17 | void dom_nodelist_ref(struct dom_nodelist *list); 18 | void dom_nodelist_unref(struct dom_nodelist *list); 19 | 20 | dom_exception dom_nodelist_get_length(struct dom_nodelist *list, 21 | uint32_t *length); 22 | dom_exception _dom_nodelist_item(struct dom_nodelist *list, 23 | uint32_t index, struct dom_node **node); 24 | 25 | #define dom_nodelist_item(l, i, n) _dom_nodelist_item((dom_nodelist *) (l), \ 26 | (uint32_t) (i), (dom_node **) (n)) 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/core/pi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_core_processinginstruction_h_ 9 | #define dom_core_processinginstruction_h_ 10 | 11 | typedef struct dom_processing_instruction dom_processing_instruction; 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/events/custom_event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_events_custom_event_h_ 9 | #define dom_events_custom_event_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_custom_event dom_custom_event; 16 | 17 | dom_exception _dom_custom_event_get_detail(dom_custom_event *evt, 18 | void **detail); 19 | #define dom_custom_event_get_detail(e, d) \ 20 | _dom_custom_event_get_detail((dom_custom_event *) (e),\ 21 | (void **) (d)) 22 | 23 | dom_exception _dom_custom_event_init_ns(dom_custom_event *evt, 24 | dom_string *namespace, dom_string *type, 25 | bool bubble, bool cancelable, void *detail); 26 | #define dom_custom_event_init_ns(e, n, t, b, c, d) \ 27 | _dom_custom_event_init_ns((dom_custom_event *) (e), \ 28 | (dom_string *) (n), (dom_string *) (t), \ 29 | (bool) (b), (bool) (c), (void *) (d)) 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/events/event_listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_events_event_listener_h_ 9 | #define dom_events_event_listener_h_ 10 | 11 | #include 12 | 13 | struct dom_document; 14 | struct dom_event; 15 | 16 | typedef void (*handle_event)(struct dom_event *evt, void *pw); 17 | 18 | typedef struct dom_event_listener dom_event_listener; 19 | 20 | dom_exception dom_event_listener_create( 21 | handle_event handler, void *pw, dom_event_listener **listener); 22 | 23 | void dom_event_listener_ref(dom_event_listener *listener); 24 | void dom_event_listener_unref(dom_event_listener *listener); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/events/events.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_events_h_ 9 | #define dom_events_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/functypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_functypes_h_ 9 | #define dom_functypes_h_ 10 | 11 | #include 12 | #include 13 | 14 | /** 15 | * Severity levels for dom_msg function, based on syslog(3) 16 | */ 17 | enum { 18 | DOM_MSG_DEBUG, 19 | DOM_MSG_INFO, 20 | DOM_MSG_NOTICE, 21 | DOM_MSG_WARNING, 22 | DOM_MSG_ERROR, 23 | DOM_MSG_CRITICAL, 24 | DOM_MSG_ALERT, 25 | DOM_MSG_EMERGENCY 26 | }; 27 | 28 | /** 29 | * Type of DOM message function 30 | */ 31 | typedef void (*dom_msg)(uint32_t severity, void *ctx, const char *msg, ...); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_base_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_base_element_h_ 9 | #define dom_html_base_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_base_element dom_html_base_element; 16 | 17 | dom_exception dom_html_base_element_get_href( 18 | dom_html_base_element *element, dom_string **href); 19 | 20 | dom_exception dom_html_base_element_set_href( 21 | dom_html_base_element *element, dom_string *href); 22 | 23 | dom_exception dom_html_base_element_get_target( 24 | dom_html_base_element *element, dom_string **target); 25 | 26 | dom_exception dom_html_base_element_set_target( 27 | dom_html_base_element *element, dom_string *target); 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_br_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_br_element_h_ 9 | #define dom_html_br_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_br_element dom_html_br_element; 16 | 17 | dom_exception dom_html_br_element_get_clear( 18 | dom_html_br_element *ele, dom_string **clear); 19 | 20 | dom_exception dom_html_br_element_set_clear( 21 | dom_html_br_element *ele, dom_string *clear); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_canvas_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2020 Vincent Sanders 6 | */ 7 | 8 | #ifndef dom_html_canvas_element_h_ 9 | #define dom_html_canvas_element_h_ 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | typedef struct dom_html_canvas_element dom_html_canvas_element; 17 | 18 | dom_exception dom_html_canvas_element_get_width( 19 | dom_html_canvas_element *object, dom_ulong *width); 20 | 21 | dom_exception dom_html_canvas_element_set_width( 22 | dom_html_canvas_element *object, dom_ulong width); 23 | 24 | dom_exception dom_html_canvas_element_get_height( 25 | dom_html_canvas_element *object, dom_ulong *height); 26 | 27 | dom_exception dom_html_canvas_element_set_height( 28 | dom_html_canvas_element *object, dom_ulong height); 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_collection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_collection_h_ 9 | #define dom_html_collection_h_ 10 | 11 | #include 12 | #include 13 | 14 | struct dom_node; 15 | 16 | typedef struct dom_html_collection dom_html_collection; 17 | 18 | dom_exception dom_html_collection_get_length(dom_html_collection *col, 19 | uint32_t *len); 20 | dom_exception dom_html_collection_item(dom_html_collection *col, 21 | uint32_t index, struct dom_node **node); 22 | dom_exception dom_html_collection_named_item(dom_html_collection *col, 23 | dom_string *name, struct dom_node **node); 24 | 25 | void dom_html_collection_ref(dom_html_collection *col); 26 | void dom_html_collection_unref(dom_html_collection *col); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_directory_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_directory_element_h_ 9 | #define dom_html_directory_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_directory_element dom_html_directory_element; 16 | 17 | dom_exception dom_html_directory_element_get_compact( 18 | dom_html_directory_element *ele, bool *compact); 19 | 20 | dom_exception dom_html_directory_element_set_compact( 21 | dom_html_directory_element *ele, bool compact); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_div_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_div_element_h_ 9 | #define dom_html_div_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_div_element dom_html_div_element; 16 | 17 | dom_exception dom_html_div_element_get_align( 18 | dom_html_div_element *element, dom_string **align); 19 | 20 | dom_exception dom_html_div_element_set_align( 21 | dom_html_div_element *element, dom_string *align); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_dlist_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_dlist_element_h_ 9 | #define dom_html_dlist_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_dlist_element dom_html_dlist_element; 16 | 17 | dom_exception dom_html_dlist_element_get_compact( 18 | dom_html_dlist_element *ele, bool *compact); 19 | 20 | dom_exception dom_html_dlist_element_set_compact( 21 | dom_html_dlist_element *ele, bool compact); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_fieldset_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | 9 | #ifndef dom_html_field_set_element_h_ 10 | #define dom_html_field_set_element_h_ 11 | 12 | #include 13 | 14 | #include 15 | 16 | #include 17 | 18 | typedef struct dom_html_field_set_element dom_html_field_set_element; 19 | 20 | struct dom_html_element; 21 | dom_exception dom_html_field_set_element_get_form( 22 | dom_html_field_set_element *ele, dom_html_form_element **form); 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_font_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_font_element_h_ 9 | #define dom_html_font_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_font_element dom_html_font_element; 16 | 17 | dom_exception dom_html_font_element_get_color( 18 | dom_html_font_element *ele, dom_string **color); 19 | 20 | dom_exception dom_html_font_element_set_color( 21 | dom_html_font_element *ele, dom_string *color); 22 | 23 | dom_exception dom_html_font_element_get_face( 24 | dom_html_font_element *ele, dom_string **face); 25 | 26 | dom_exception dom_html_font_element_set_face( 27 | dom_html_font_element *ele, dom_string *face); 28 | 29 | dom_exception dom_html_font_element_get_size( 30 | dom_html_font_element *ele, dom_string **size); 31 | 32 | dom_exception dom_html_font_element_set_size( 33 | dom_html_font_element *ele, dom_string *size); 34 | #endif 35 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_frameset_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_frame_set_element_h_ 9 | #define dom_html_frame_set_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_frame_set_element dom_html_frame_set_element; 16 | 17 | dom_exception dom_html_frame_set_element_get_rows( 18 | dom_html_frame_set_element *element, dom_string **rows); 19 | 20 | dom_exception dom_html_frame_set_element_set_rows( 21 | dom_html_frame_set_element *element, dom_string *rows); 22 | 23 | dom_exception dom_html_frame_set_element_set_cols( 24 | dom_html_frame_set_element *ele, dom_string *cols); 25 | 26 | dom_exception dom_html_frame_set_element_get_cols( 27 | dom_html_frame_set_element *ele, dom_string **cols); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_head_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_head_element_h_ 9 | #define dom_html_head_element_h_ 10 | 11 | #include 12 | 13 | typedef struct dom_html_head_element dom_html_head_element; 14 | 15 | dom_exception dom_html_head_element_get_profile( 16 | struct dom_html_head_element *element, dom_string **profile); 17 | dom_exception dom_html_head_element_set_profile( 18 | struct dom_html_head_element *element, dom_string *profile); 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_heading_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_heading_element_h_ 9 | #define dom_html_heading_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_heading_element dom_html_heading_element; 16 | 17 | dom_exception dom_html_heading_element_get_align( 18 | dom_html_heading_element *element, dom_string **align); 19 | 20 | dom_exception dom_html_heading_element_set_align( 21 | dom_html_heading_element *element, dom_string *align); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_html_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_html_element_h_ 9 | #define dom_html_html_element_h_ 10 | 11 | #include 12 | 13 | typedef struct dom_html_html_element dom_html_html_element; 14 | 15 | dom_exception dom_html_html_element_get_version( 16 | struct dom_html_html_element *element, dom_string **version); 17 | dom_exception dom_html_html_element_set_version( 18 | struct dom_html_html_element *element, dom_string *version); 19 | 20 | 21 | #endif 22 | 23 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_isindex_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_isindex_element_h_ 9 | #define dom_html_isindex_element_h_ 10 | 11 | #include 12 | #include 13 | 14 | struct dom_html_form_element; 15 | 16 | /** 17 | * Note: the HTML 4.01 spec said: this element is deprecated, use 18 | * element instead. 19 | */ 20 | 21 | typedef struct dom_html_isindex_element dom_html_isindex_element; 22 | 23 | dom_exception dom_html_isindex_element_get_form(dom_html_isindex_element *ele, 24 | struct dom_html_form_element **form); 25 | 26 | dom_exception dom_html_isindex_element_get_prompt(dom_html_isindex_element *ele, 27 | dom_string **prompt); 28 | 29 | dom_exception dom_html_isindex_element_set_prompt(dom_html_isindex_element *ele, 30 | dom_string *prompt); 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_label_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_label_element_h_ 9 | #define dom_html_label_element_h_ 10 | 11 | #include 12 | 13 | #include 14 | 15 | #include 16 | 17 | typedef struct dom_html_label_element dom_html_label_element; 18 | 19 | dom_exception dom_html_label_element_get_access_key( 20 | dom_html_label_element *ele, dom_string **access_key); 21 | dom_exception dom_html_label_element_set_access_key( 22 | dom_html_label_element *ele, dom_string *access_key); 23 | 24 | dom_exception dom_html_label_element_get_html_for( 25 | dom_html_label_element *ele, dom_string **html_for); 26 | dom_exception dom_html_label_element_set_html_for( 27 | dom_html_label_element *ele, dom_string *html_for); 28 | 29 | dom_exception dom_html_label_element_get_form( 30 | dom_html_label_element *ele, dom_html_form_element **form); 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_legend_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_legend_element_h_ 9 | #define dom_html_legend_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | typedef struct dom_html_legend_element dom_html_legend_element; 18 | 19 | dom_exception dom_html_legend_element_get_form( 20 | dom_html_legend_element *ele, dom_html_form_element **form); 21 | 22 | dom_exception dom_html_legend_element_get_access_key( 23 | dom_html_legend_element *element, dom_string **access_key); 24 | 25 | dom_exception dom_html_legend_element_set_access_key( 26 | dom_html_legend_element *element, dom_string *access_key); 27 | 28 | dom_exception dom_html_legend_element_get_align( 29 | dom_html_legend_element *element, dom_string **align); 30 | 31 | dom_exception dom_html_legend_element_set_align( 32 | dom_html_legend_element *ele, dom_string *align); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_li_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_li_element_h_ 9 | #define dom_html_li_element_h_ 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | typedef struct dom_html_li_element dom_html_li_element; 18 | 19 | dom_exception dom_html_li_element_get_value( 20 | dom_html_li_element *ele, dom_long *value); 21 | 22 | dom_exception dom_html_li_element_set_value( 23 | dom_html_li_element *ele, dom_long value); 24 | 25 | dom_exception dom_html_li_element_get_type( 26 | dom_html_li_element *ele, dom_string **type); 27 | 28 | dom_exception dom_html_li_element_set_type( 29 | dom_html_li_element *ele, dom_string *type); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_map_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_map_element_h_ 9 | #define dom_html_map_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | typedef struct dom_html_map_element dom_html_map_element; 18 | 19 | dom_exception dom_html_map_element_get_name( 20 | dom_html_map_element *ele, dom_string **name); 21 | 22 | dom_exception dom_html_map_element_set_name( 23 | dom_html_map_element *ele, dom_string *name); 24 | 25 | dom_exception dom_html_map_element_get_areas( 26 | dom_html_map_element *ele, dom_html_collection **areas); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_menu_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_menu_element_h_ 9 | #define dom_html_menu_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_menu_element dom_html_menu_element; 16 | 17 | dom_exception dom_html_menu_element_get_compact( 18 | dom_html_menu_element *ele, bool *compact); 19 | 20 | dom_exception dom_html_menu_element_set_compact( 21 | dom_html_menu_element *ele, bool compact); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_mod_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_mod_element_h_ 9 | #define dom_html_mod_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_mod_element dom_html_mod_element; 16 | 17 | dom_exception dom_html_mod_element_get_cite( 18 | dom_html_mod_element *ele, dom_string **cite); 19 | 20 | dom_exception dom_html_mod_element_set_cite( 21 | dom_html_mod_element *ele, dom_string *cite); 22 | 23 | dom_exception dom_html_mod_element_get_date_time( 24 | dom_html_mod_element *ele, dom_string **date_time); 25 | 26 | dom_exception dom_html_mod_element_set_date_time( 27 | dom_html_mod_element *ele, dom_string *date_time); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_opt_group_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2012 Daniel Silverstone 6 | */ 7 | 8 | #ifndef dom_html_opt_group_element_h_ 9 | #define dom_html_opt_group_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | typedef struct dom_html_opt_group_element dom_html_opt_group_element; 17 | 18 | dom_exception dom_html_opt_group_element_get_form( 19 | dom_html_opt_group_element *opt_group, dom_html_form_element **form); 20 | 21 | dom_exception dom_html_opt_group_element_get_disabled( 22 | dom_html_opt_group_element *opt_group, bool *disabled); 23 | 24 | dom_exception dom_html_opt_group_element_set_disabled( 25 | dom_html_opt_group_element *opt_group, bool disabled); 26 | 27 | dom_exception dom_html_opt_group_element_get_label( 28 | dom_html_opt_group_element *opt_group, dom_string **label); 29 | 30 | dom_exception dom_html_opt_group_element_set_label( 31 | dom_html_opt_group_element *opt_group, dom_string *label); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_options_collection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_options_collection_h_ 9 | #define dom_html_options_collection_h_ 10 | 11 | #include 12 | #include 13 | 14 | struct dom_node; 15 | 16 | typedef struct dom_html_options_collection dom_html_options_collection; 17 | 18 | dom_exception dom_html_options_collection_get_length( 19 | dom_html_options_collection *col, uint32_t *len); 20 | dom_exception dom_html_options_collection_set_length( 21 | dom_html_options_collection *col, uint32_t len); 22 | dom_exception dom_html_options_collection_item( 23 | dom_html_options_collection *col, uint32_t index, 24 | struct dom_node **node); 25 | dom_exception dom_html_options_collection_named_item( 26 | dom_html_options_collection *col, dom_string *name, 27 | struct dom_node **node); 28 | 29 | void dom_html_options_collection_ref(dom_html_options_collection *col); 30 | void dom_html_options_collection_unref(dom_html_options_collection *col); 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_paragraph_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_paragraph_element_h_ 9 | #define dom_html_paragraph_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_paragraph_element dom_html_paragraph_element; 16 | 17 | dom_exception dom_html_paragraph_element_get_align( 18 | dom_html_paragraph_element *element, dom_string **align); 19 | 20 | dom_exception dom_html_paragraph_element_set_align( 21 | dom_html_paragraph_element *element, dom_string *align); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_pre_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_pre_element_h_ 9 | #define dom_html_pre_element_h_ 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | typedef struct dom_html_pre_element dom_html_pre_element; 18 | 19 | dom_exception dom_html_pre_element_get_width( 20 | dom_html_pre_element *element, dom_long *width); 21 | 22 | dom_exception dom_html_pre_element_set_width( 23 | dom_html_pre_element *element, dom_long width); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_quote_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_quote_element_h_ 9 | #define dom_html_quote_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_quote_element dom_html_quote_element; 16 | 17 | dom_exception dom_html_quote_element_get_cite( 18 | dom_html_quote_element *element, dom_string **cite); 19 | 20 | dom_exception dom_html_quote_element_set_cite( 21 | dom_html_quote_element *element, dom_string *cite); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_style_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_style_element_h_ 9 | #define dom_html_style_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_style_element dom_html_style_element; 16 | 17 | dom_exception dom_html_style_element_get_disabled(dom_html_style_element *ele, 18 | bool *disabled); 19 | 20 | dom_exception dom_html_style_element_set_disabled(dom_html_style_element *ele, 21 | bool disabled); 22 | 23 | dom_exception dom_html_style_element_get_media(dom_html_style_element *ele, 24 | dom_string **media); 25 | 26 | dom_exception dom_html_style_element_set_media(dom_html_style_element *ele, 27 | dom_string *media); 28 | 29 | dom_exception dom_html_style_element_get_type(dom_html_style_element *ele, 30 | dom_string **type); 31 | 32 | dom_exception dom_html_style_element_set_type(dom_html_style_element *ele, 33 | dom_string *type); 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_tablecaption_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_table_caption_element_h_ 9 | #define dom_html_table_caption_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_table_caption_element dom_html_table_caption_element; 16 | 17 | dom_exception dom_html_table_caption_element_get_align( 18 | dom_html_table_caption_element *element, dom_string **align); 19 | 20 | dom_exception dom_html_table_caption_element_set_align( 21 | dom_html_table_caption_element *element, dom_string *align); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_title_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_html_title_element_h_ 9 | #define dom_html_title_element_h_ 10 | 11 | #include 12 | #include 13 | 14 | typedef struct dom_html_title_element dom_html_title_element; 15 | 16 | dom_exception dom_html_title_element_get_text(dom_html_title_element *ele, 17 | dom_string **text); 18 | 19 | dom_exception dom_html_title_element_set_text(dom_html_title_element *ele, 20 | dom_string *text); 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/html/html_ulist_element.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * Copyright 2014 Rupinder Singh Khokhar 7 | */ 8 | #ifndef dom_html_u_list_element_h_ 9 | #define dom_html_u_list_element_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct dom_html_u_list_element dom_html_u_list_element; 16 | 17 | dom_exception dom_html_u_list_element_get_compact( 18 | dom_html_u_list_element *ele, bool *compact); 19 | 20 | dom_exception dom_html_u_list_element_set_compact( 21 | dom_html_u_list_element *ele, bool compact); 22 | 23 | dom_exception dom_html_u_list_element_get_type( 24 | dom_html_u_list_element *ele, dom_string **type); 25 | 26 | dom_exception dom_html_u_list_element_set_type( 27 | dom_html_u_list_element *ele, dom_string *type); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /contrib/libdom/include/dom/inttypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2015 Vincent Sanders 6 | */ 7 | 8 | #ifndef dom_inttypes_h_ 9 | #define dom_inttypes_h_ 10 | 11 | #include 12 | 13 | /** 14 | * The IDL spec(2nd ed) 3.10.5 defines a short type with 16bit range 15 | */ 16 | typedef int16_t dom_short; 17 | 18 | /** 19 | * The IDL spec(2nd ed) 3.10.6 defines an unsigned short type with 16bit range 20 | */ 21 | typedef uint16_t dom_ushort; 22 | 23 | /** 24 | * The IDL spec(2nd ed) 3.10.7 defines a long type with 32bit range 25 | */ 26 | typedef int32_t dom_long; 27 | 28 | /** 29 | * The IDL spec(2nd ed) 3.10.8 defines an unsigned long type with 32bit range 30 | */ 31 | typedef uint32_t dom_ulong; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /contrib/libdom/src/core/cdatasection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_internal_core_cdatasection_h_ 9 | #define dom_internal_core_cdatasection_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | struct dom_node_internal; 16 | struct dom_document; 17 | 18 | dom_exception _dom_cdata_section_create(struct dom_document *doc, 19 | dom_string *name, dom_string *value, 20 | dom_cdata_section **result); 21 | 22 | void _dom_cdata_section_destroy(dom_cdata_section *cdata); 23 | 24 | #define _dom_cdata_section_initialise _dom_text_initialise 25 | #define _dom_cdata_section_finalise _dom_text_finalise 26 | 27 | /* Following comes the protected vtable */ 28 | void __dom_cdata_section_destroy(struct dom_node_internal *node); 29 | dom_exception _dom_cdata_section_copy(struct dom_node_internal *old, 30 | struct dom_node_internal **copy); 31 | 32 | #define DOM_CDATA_SECTION_PROTECT_VTABLE \ 33 | __dom_cdata_section_destroy, \ 34 | _dom_cdata_section_copy 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /contrib/libdom/src/core/comment.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_internal_core_comment_h_ 9 | #define dom_internal_core_comment_h_ 10 | 11 | #include 12 | #include 13 | 14 | struct dom_comment; 15 | struct dom_document; 16 | 17 | dom_exception _dom_comment_create(struct dom_document *doc, 18 | dom_string *name, dom_string *value, 19 | dom_comment **result); 20 | 21 | #define _dom_comment_initialise _dom_characterdata_initialise 22 | #define _dom_comment_finalise _dom_characterdata_finalise 23 | 24 | void _dom_comment_destroy(dom_comment *comment); 25 | 26 | /* Following comes the protected vtable */ 27 | void __dom_comment_destroy(dom_node_internal *node); 28 | dom_exception _dom_comment_copy(dom_node_internal *old, 29 | dom_node_internal **copy); 30 | 31 | #define DOM_COMMENT_PROTECT_VTABLE \ 32 | __dom_comment_destroy, \ 33 | _dom_comment_copy 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /contrib/libdom/src/core/doc_fragment.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_internal_core_documentfragment_h_ 9 | #define dom_internal_core_documentfragment_h_ 10 | 11 | #include 12 | #include 13 | 14 | dom_exception _dom_document_fragment_create(dom_document *doc, 15 | dom_string *name, dom_string *value, 16 | dom_document_fragment **result); 17 | 18 | void _dom_document_fragment_destroy(dom_document_fragment *frag); 19 | 20 | #define _dom_document_fragment_initialise _dom_node_initialise 21 | #define _dom_document_fragment_finalise _dom_node_finalise 22 | 23 | 24 | /* Following comes the protected vtable */ 25 | void _dom_df_destroy(dom_node_internal *node); 26 | dom_exception _dom_df_copy(dom_node_internal *old, dom_node_internal **copy); 27 | 28 | #define DOM_DF_PROTECT_VTABLE \ 29 | _dom_df_destroy, \ 30 | _dom_df_copy 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /contrib/libdom/src/core/entity_ref.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_internal_core_entityrererence_h_ 9 | #define dom_internal_core_entityrererence_h_ 10 | 11 | #include 12 | #include 13 | 14 | dom_exception _dom_entity_reference_create(dom_document *doc, 15 | dom_string *name, dom_string *value, 16 | dom_entity_reference **result); 17 | 18 | void _dom_entity_reference_destroy(dom_entity_reference *entity); 19 | 20 | #define _dom_entity_reference_initialise _dom_node_initialise 21 | #define _dom_entity_reference_finalise _dom_node_finalise 22 | 23 | /* Following comes the protected vtable */ 24 | void _dom_er_destroy(dom_node_internal *node); 25 | dom_exception _dom_er_copy(dom_node_internal *old, dom_node_internal **copy); 26 | 27 | #define DOM_ER_PROTECT_VTABLE \ 28 | _dom_er_destroy, \ 29 | _dom_er_copy 30 | 31 | /* Helper functions */ 32 | dom_exception _dom_entity_reference_get_textual_representation( 33 | dom_entity_reference *entity, 34 | dom_string **result); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /contrib/libdom/src/core/pi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_internal_core_processinginstruction_h_ 9 | #define dom_internal_core_processinginstruction_h_ 10 | 11 | #include 12 | #include 13 | 14 | dom_exception _dom_processing_instruction_create(dom_document *doc, 15 | dom_string *name, dom_string *value, 16 | dom_processing_instruction **result); 17 | 18 | void _dom_processing_instruction_destroy(dom_processing_instruction *pi); 19 | 20 | #define _dom_processing_instruction_initialise _dom_node_initialise 21 | #define _dom_processing_instruction_finalise _dom_node_finalise 22 | 23 | /* Following comes the protected vtable */ 24 | void _dom_pi_destroy(dom_node_internal *node); 25 | dom_exception _dom_pi_copy(dom_node_internal *old, dom_node_internal **copy); 26 | 27 | #define DOM_PI_PROTECT_VTABLE \ 28 | _dom_pi_destroy, \ 29 | _dom_pi_copy 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /contrib/libdom/src/core/tokenlist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_internal_core_tokenlist_h_ 9 | #define dom_internal_core_tokenlist_h_ 10 | 11 | #include 12 | 13 | #include 14 | 15 | struct dom_element; 16 | struct dom_string; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /contrib/libdom/src/events/custom_event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_interntal_events_custom_event_h_ 9 | #define dom_interntal_events_custom_event_h_ 10 | 11 | #include 12 | 13 | #include "events/event.h" 14 | 15 | struct dom_custom_event { 16 | struct dom_event base; 17 | void *detail; 18 | }; 19 | 20 | /* Constructor */ 21 | dom_exception _dom_custom_event_create(struct dom_custom_event **evt); 22 | 23 | /* Destructor */ 24 | void _dom_custom_event_destroy(struct dom_custom_event *evt); 25 | 26 | /* Initialise function */ 27 | dom_exception _dom_custom_event_initialise(struct dom_custom_event *evt); 28 | 29 | /* Finalise function */ 30 | void _dom_custom_event_finalise(struct dom_custom_event *evt); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /contrib/libdom/src/events/event_listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_internal_events_event_listener_h_ 9 | #define dom_internal_events_event_listener_h_ 10 | 11 | #include 12 | 13 | #include "utils/list.h" 14 | 15 | /** 16 | * The EventListener class 17 | */ 18 | struct dom_event_listener { 19 | handle_event handler; /**< The event handler function */ 20 | void *pw; /**< The private data of this listener */ 21 | 22 | unsigned int refcnt; /**< The reference count of this listener */ 23 | struct dom_document *doc; 24 | /**< The document which create this listener */ 25 | }; 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /contrib/libdom/src/events/mouse_wheel_event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_events_internal_mouse_wheel_event_h_ 9 | #define dom_events_internal_mouse_wheel_event_h_ 10 | 11 | #include 12 | 13 | #include "events/mouse_event.h" 14 | 15 | /** 16 | * The MouseWheelEvent 17 | */ 18 | struct dom_mouse_wheel_event { 19 | struct dom_mouse_event base; /**< The base class */ 20 | 21 | int32_t delta; /**< The wheelDelta */ 22 | }; 23 | 24 | /* Constructor */ 25 | dom_exception _dom_mouse_wheel_event_create(struct dom_mouse_wheel_event **evt); 26 | 27 | /* Destructor */ 28 | void _dom_mouse_wheel_event_destroy(struct dom_mouse_wheel_event *evt); 29 | 30 | /* Initialise function */ 31 | dom_exception _dom_mouse_wheel_event_initialise( 32 | struct dom_mouse_wheel_event *evt); 33 | 34 | /* Finalise function */ 35 | #define _dom_mouse_wheel_event_finalise _dom_mouse_event_finalise 36 | 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /contrib/libdom/src/events/mutation_event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_interntal_events_mutation_event_h_ 9 | #define dom_interntal_events_mutation_event_h_ 10 | 11 | #include 12 | 13 | #include "events/event.h" 14 | 15 | /** 16 | * The MutationEvent 17 | */ 18 | struct dom_mutation_event { 19 | struct dom_event base; 20 | 21 | struct dom_node *related_node; 22 | dom_string *prev_value; 23 | dom_string *new_value; 24 | dom_string *attr_name; 25 | dom_mutation_type change; 26 | }; 27 | 28 | /* Constructor */ 29 | dom_exception _dom_mutation_event_create(struct dom_mutation_event **evt); 30 | 31 | /* Destructor */ 32 | void _dom_mutation_event_destroy(struct dom_mutation_event *evt); 33 | 34 | /* Initialise function */ 35 | dom_exception _dom_mutation_event_initialise(struct dom_mutation_event *evt); 36 | 37 | /* Finalise function */ 38 | void _dom_mutation_event_finalise(struct dom_mutation_event *evt); 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /contrib/libdom/src/events/mutation_name_event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_interntal_events_mutation_name_event_h_ 9 | #define dom_interntal_events_mutation_name_event_h_ 10 | 11 | #include 12 | 13 | #include "events/mutation_event.h" 14 | 15 | /** 16 | * The MutationName event 17 | */ 18 | struct dom_mutation_name_event { 19 | struct dom_mutation_event base; 20 | 21 | dom_string *prev_namespace; 22 | dom_string *prev_nodename; 23 | }; 24 | 25 | /* Constructor */ 26 | dom_exception _dom_mutation_name_event_create( 27 | struct dom_mutation_name_event **evt); 28 | 29 | /* Destructor */ 30 | void _dom_mutation_name_event_destroy(struct dom_mutation_name_event *evt); 31 | 32 | /* Initialise function */ 33 | dom_exception _dom_mutation_name_event_initialise( 34 | struct dom_mutation_name_event *evt); 35 | 36 | /* Finalise function */ 37 | void _dom_mutation_name_event_finalise(struct dom_mutation_name_event *evt); 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /contrib/libdom/src/events/text_event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | */ 7 | 8 | #ifndef dom_internal_events_text_event_h_ 9 | #define dom_internal_events_text_event_h_ 10 | 11 | #include 12 | 13 | #include "events/ui_event.h" 14 | 15 | /** 16 | * The TextEvent 17 | */ 18 | struct dom_text_event { 19 | struct dom_ui_event base; 20 | dom_string *data; 21 | }; 22 | 23 | /* Constructor */ 24 | dom_exception _dom_text_event_create(struct dom_text_event **evt); 25 | 26 | /* Destructor */ 27 | void _dom_text_event_destroy(struct dom_text_event *evt); 28 | 29 | /* Initialise function */ 30 | dom_exception _dom_text_event_initialise(struct dom_text_event *evt); 31 | 32 | /* Finalise function */ 33 | void _dom_text_event_finalise(struct dom_text_event *evt); 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /contrib/libdom/src/utils/namespace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_utils_namespace_h_ 9 | #define dom_utils_namespace_h_ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | struct dom_document; 16 | 17 | /* Ensure a QName is valid */ 18 | dom_exception _dom_namespace_validate_qname(dom_string *qname, 19 | dom_string *namespace); 20 | 21 | /* Split a QName into a namespace prefix and localname string */ 22 | dom_exception _dom_namespace_split_qname(dom_string *qname, 23 | dom_string **prefix, dom_string **localname); 24 | 25 | /* Get the XML prefix dom_string */ 26 | dom_string *_dom_namespace_get_xml_prefix(void); 27 | 28 | /* Get the XMLNS prefix dom_string */ 29 | dom_string *_dom_namespace_get_xmlns_prefix(void); 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /contrib/libdom/src/utils/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef dom_utils_utils_h_ 9 | #define dom_utils_utils_h_ 10 | 11 | #ifndef max 12 | #define max(a,b) ((a)>(b)?(a):(b)) 13 | #endif 14 | 15 | #ifndef min 16 | #define min(a,b) ((a)<(b)?(a):(b)) 17 | #endif 18 | 19 | #ifndef SLEN 20 | /* Calculate length of a string constant */ 21 | #define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */ 22 | #endif 23 | 24 | #ifndef UNUSED 25 | #define UNUSED(x) ((void)(x)) 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /contrib/libdom/src/utils/validate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of libdom. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 Bo Yang 6 | * 7 | * This file contains the API used to validate whether certain element's 8 | * name/namespace are legal according the XML 1.0 standard. See 9 | * 10 | * http://www.w3.org/TR/2004/REC-xml-20040204/ 11 | * 12 | * for detail. 13 | */ 14 | 15 | #ifndef dom_utils_valid_h_ 16 | #define dom_utils_valid_h_ 17 | 18 | #include 19 | #include 20 | 21 | bool _dom_validate_name(dom_string *name); 22 | bool _dom_validate_ncname(dom_string *name); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /contrib/libhubbub/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright (C) 2007 J-M Bell 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | * The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /contrib/libhubbub/README.md: -------------------------------------------------------------------------------- 1 | # Hubbub 2 | 3 | Hubbub is a flexible HTML parser. It aims to comply with the HTML5 specification. 4 | -------------------------------------------------------------------------------- /contrib/libhubbub/docs/Todo: -------------------------------------------------------------------------------- 1 | TODO list 2 | ========= 3 | 4 | + Error checking 5 | + Documentation 6 | + Implement one or more tree builders 7 | - test/tree2.c would serve as a basic tree builder 8 | - NetSurf's libxml2 binding could do with being brought back here somehow 9 | + Parse error reporting (incl. acknowledging self-closing flags) 10 | + Implement extraneous chunk insertion/tokenisation 11 | + Statistical charset autodetection 12 | + Shared library, for those platforms that support such things 13 | - requires possibly prefixing more things with hubbub_ 14 | + Optimise it 15 | - being clever with e.g. attribute allocation in tokeniser 16 | - tag name interning / replacing element_type_from_name() 17 | - Hixie's data (http://tinyurl.com/hixie-html5-data-2007) 18 | -------------------------------------------------------------------------------- /contrib/libhubbub/include/hubbub/errors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Hubbub. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef hubbub_errors_h_ 9 | #define hubbub_errors_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | 18 | typedef enum hubbub_error { 19 | HUBBUB_OK = 0, /**< No error */ 20 | HUBBUB_REPROCESS = 1, 21 | HUBBUB_ENCODINGCHANGE = 2, 22 | HUBBUB_PAUSED = 3, /**< tokenisation is paused */ 23 | 24 | HUBBUB_NOMEM = 5, 25 | HUBBUB_BADPARM = 6, 26 | HUBBUB_INVALID = 7, 27 | HUBBUB_FILENOTFOUND = 8, 28 | HUBBUB_NEEDDATA = 9, 29 | HUBBUB_BADENCODING = 10, 30 | 31 | HUBBUB_UNKNOWN = 11 32 | } hubbub_error; 33 | 34 | /* Convert a hubbub error value to a string */ 35 | const char *hubbub_error_to_string(hubbub_error error); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /contrib/libhubbub/include/hubbub/hubbub.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Hubbub. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef hubbub_h_ 9 | #define hubbub_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /contrib/libhubbub/src/charset/detect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Hubbub. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef hubbub_charset_detect_h_ 9 | #define hubbub_charset_detect_h_ 10 | 11 | #include 12 | 13 | #include 14 | 15 | /* Extract a charset from a chunk of data */ 16 | parserutils_error hubbub_charset_extract(const uint8_t *data, size_t len, 17 | uint16_t *mibenum, uint32_t *source); 18 | 19 | /* Parse a Content-Type string for an encoding */ 20 | uint16_t hubbub_charset_parse_content(const uint8_t *value, 21 | uint32_t valuelen); 22 | 23 | /* Fix up frequently misused character sets */ 24 | void hubbub_charset_fix_charset(uint16_t *charset); 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /contrib/libhubbub/src/tokeniser/entities.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Hubbub. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef hubbub_tokeniser_entities_h_ 9 | #define hubbub_tokeniser_entities_h_ 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | /* Step-wise search for an entity in the dictionary */ 17 | hubbub_error hubbub_entities_search_step(uint8_t c, uint32_t *result, 18 | int32_t *context); 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /contrib/libhubbub/src/utils/string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Hubbub. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2008 Andrew Sidwell 6 | */ 7 | 8 | #ifndef hubbub_string_h_ 9 | #define hubbub_string_h_ 10 | 11 | /** Match two strings case-sensitively */ 12 | bool hubbub_string_match(const uint8_t *a, size_t a_len, 13 | const uint8_t *b, size_t b_len); 14 | 15 | /** Match two strings case-insensitively */ 16 | bool hubbub_string_match_ci(const uint8_t *a, size_t a_len, 17 | const uint8_t *b, size_t b_len); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /contrib/libhubbub/src/utils/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Hubbub. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef hubbub_utils_h_ 9 | #define hubbub_utils_h_ 10 | 11 | #ifndef max 12 | #define max(a,b) ((a)>(b)?(a):(b)) 13 | #endif 14 | 15 | #ifndef min 16 | #define min(a,b) ((a)<(b)?(a):(b)) 17 | #endif 18 | 19 | #ifndef SLEN 20 | /* Calculate length of a string constant */ 21 | #define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */ 22 | #endif 23 | 24 | #ifndef UNUSED 25 | #define UNUSED(x) ((void)(x)) 26 | #endif 27 | 28 | /* Useful for iterating over arrays */ 29 | #define N_ELEMENTS(x) sizeof((x)) / sizeof((x)[0]) 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /contrib/libnsbmp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(nsbmp SHARED 2 | src/libnsbmp.c 3 | ) 4 | set_target_properties(nsbmp PROPERTIES SOVERSION ${NEOSURF_ABI}) 5 | 6 | install(TARGETS nsbmp DESTINATION ${CMAKE_INSTALL_LIBDIR}) 7 | install(FILES include/libnsbmp.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) 8 | -------------------------------------------------------------------------------- /contrib/libnsbmp/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright (C) 2006 Richard Wilson 2 | Copyright (C) 2008 Sean Fox 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | * The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /contrib/libnsbmp/meson.build: -------------------------------------------------------------------------------- 1 | nsbmp_src = files( 2 | 'src/libnsbmp.c', 3 | ) 4 | 5 | library('nsbmp', nsbmp_src) 6 | -------------------------------------------------------------------------------- /contrib/libnsbmp/src/utils/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2003 James Bursa 3 | * Copyright 2004 John Tytgat 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * Licensed under the MIT License, 7 | * http://www.opensource.org/licenses/mit-license.php 8 | */ 9 | 10 | #include 11 | 12 | #ifndef _LIBNSBMP_LOG_H_ 13 | #define _LIBNSBMP_LOG_H_ 14 | 15 | #ifdef NDEBUG 16 | # define LOG(x) ((void) 0) 17 | #else 18 | # ifdef __GNUC__ 19 | # define LOG(x) do { printf x, fputc('\n', stdout)); } while (0) 20 | # elif defined(__CC_NORCROFT) 21 | # define LOG(x) do { printf x, fputc('\n', stdout)); } while (0) 22 | # else 23 | # define LOG(x) do { printf x, fputc('\n', stdout)); } while (0) 24 | # endif 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /contrib/libnsgif/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(nsgif SHARED 2 | src/gif.c 3 | src/lzw.c 4 | ) 5 | set_target_properties(nsgif PROPERTIES SOVERSION ${NEOSURF_ABI}) 6 | 7 | install(TARGETS nsgif DESTINATION ${CMAKE_INSTALL_LIBDIR}) 8 | install(FILES include/nsgif.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) 9 | -------------------------------------------------------------------------------- /contrib/libnsgif/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright (C) 2004 Richard Wilson 2 | Copyright (C) 2008 Sean Fox 3 | Copyright (C) 2013-2021 Michael Drake 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | * The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /contrib/libnsgif/meson.build: -------------------------------------------------------------------------------- 1 | nsgif_src = files( 2 | 'src/gif.c', 3 | 'src/lzw.c' 4 | ) 5 | 6 | library('nsgif', nsgif_src) 7 | -------------------------------------------------------------------------------- /contrib/libnsgif/src/utils/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2003 James Bursa 3 | * Copyright 2004 John Tytgat 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * Licensed under the MIT License, 7 | * http://www.opensource.org/licenses/mit-license.php 8 | */ 9 | 10 | #include 11 | 12 | #ifndef _LIBNSGIF_LOG_H_ 13 | #define _LIBNSGIF_LOG_H_ 14 | 15 | #ifdef NDEBUG 16 | # define LOG(x) ((void) 0) 17 | #else 18 | # define LOG(x) do { fprintf(stderr, x), fputc('\n', stderr); } while (0) 19 | #endif /* NDEBUG */ 20 | 21 | #endif /* _LIBNSGIF_LOG_H_ */ 22 | -------------------------------------------------------------------------------- /contrib/libnsutils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(nsutils SHARED 2 | src/base64.c 3 | src/time.c 4 | src/unistd.c 5 | src/libwapcaplet.c 6 | ) 7 | set_target_properties(nsutils PROPERTIES SOVERSION ${NEOSURF_ABI}) 8 | 9 | install(TARGETS nsutils DESTINATION ${CMAKE_INSTALL_LIBDIR}) 10 | install(DIRECTORY include/libwapcaplet DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) 11 | install(DIRECTORY include/nsutils DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) 12 | -------------------------------------------------------------------------------- /contrib/libnsutils/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright 2014 Vincent Sanders 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | * The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /contrib/libnsutils/README.md: -------------------------------------------------------------------------------- 1 | # Libnsutils 2 | 3 | Libnsutils provides a small number of useful utility routines which require platform-specific implementations. 4 | 5 | ## API documentation 6 | Currently, there is none. However, the code is well commented and the public API may be found in the "include" directory. 7 | 8 | -------------------------------------------------------------------------------- /contrib/libnsutils/include/nsutils/assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibNSUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2022 Michael Drake 6 | */ 7 | 8 | /** 9 | * \file 10 | * Static assertion macro. 11 | */ 12 | 13 | #ifndef NSUTILS_ASSERT_H__ 14 | #define NSUTILS_ASSERT_H__ 15 | 16 | /** Compile time assertion macro. */ 17 | #define ns_static_assert(e) \ 18 | { \ 19 | enum { \ 20 | cyaml_static_assert_check = 1 / (!!(e)) \ 21 | }; \ 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /contrib/libnsutils/include/nsutils/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Vincent Sanders 3 | * 4 | * This file is part of libnsutils. 5 | * 6 | * Licensed under the MIT License, 7 | * http://www.opensource.org/licenses/mit-license.php 8 | */ 9 | 10 | /** 11 | * \file 12 | * Time related operations. 13 | */ 14 | 15 | #ifndef NSUTILS_TIME_H_ 16 | #define NSUTILS_TIME_H_ 17 | 18 | #include 19 | 20 | #include 21 | 22 | /** 23 | * Get a monotonically incrementing number of milliseconds. 24 | * 25 | * Obtain a count of elapsed time in milliseconds from an arbitrary point in 26 | * time. Unlike gettimeofday this will continue linearly across time setting 27 | * and not go backwards. 28 | * 29 | * \param current The current value of the counter. 30 | * \return NSERROR_OK on success else error code. 31 | */ 32 | nsuerror nsu_getmonotonic_ms(uint64_t *current); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /contrib/libnsutils/meson.build: -------------------------------------------------------------------------------- 1 | nsutils_src = files( 2 | 'src/base64.c', 3 | 'src/time.c', 4 | 'src/unistd.c', 5 | 'src/libwapcaplet.c' 6 | ) 7 | 8 | library('nsutils', nsutils_src) 9 | -------------------------------------------------------------------------------- /contrib/libparserutils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(parserutils SHARED 2 | src/input/filter.c 3 | src/input/inputstream.c 4 | src/charset/aliases.c 5 | src/charset/encodings/utf8.c 6 | src/utils/buffer.c 7 | src/utils/stack.c 8 | src/utils/vector.c 9 | ) 10 | set_target_properties(parserutils PROPERTIES SOVERSION ${NEOSURF_ABI}) 11 | 12 | install(TARGETS parserutils DESTINATION ${CMAKE_INSTALL_LIBDIR}) 13 | 14 | include_directories(${CMAKE_SOURCE_DIR}/contrib/libparserutils/src) 15 | 16 | install(DIRECTORY include/parserutils DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) 17 | -------------------------------------------------------------------------------- /contrib/libparserutils/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright (C) 2007-8 J-M Bell 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | * The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /contrib/libparserutils/README.md: -------------------------------------------------------------------------------- 1 | # LibParserUtils 2 | 3 | LibParserUtils provides various pieces of functionality that are useful when writing parsers. These are: 4 | * A number of character set convertors 5 | * Mapping of character set names to/from MIB enum values 6 | * UTF-8 and UTF-16 (host endian) support functions 7 | * Various simple data structures (resizeable buffer, stack, vector) 8 | * A UTF-8 input stream 9 | -------------------------------------------------------------------------------- /contrib/libparserutils/docs/Todo: -------------------------------------------------------------------------------- 1 | Todo list 2 | --------- 3 | 4 | + Charset conversion should use Unicode Normalisation Form C. 5 | 6 | -------------------------------------------------------------------------------- /contrib/libparserutils/include/parserutils/charset/mibenum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_charset_mibenum_h_ 9 | #define parserutils_charset_mibenum_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | #include 18 | 19 | #include 20 | #include 21 | 22 | /* Convert an encoding alias to a MIB enum value */ 23 | uint16_t parserutils_charset_mibenum_from_name(const char *alias, size_t len); 24 | /* Convert a MIB enum value into an encoding alias */ 25 | const char *parserutils_charset_mibenum_to_name(uint16_t mibenum); 26 | /* Determine if a MIB enum value represents a Unicode variant */ 27 | bool parserutils_charset_mibenum_is_unicode(uint16_t mibenum); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /contrib/libparserutils/include/parserutils/errors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_errors_h_ 9 | #define parserutils_errors_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | 18 | typedef enum parserutils_error { 19 | PARSERUTILS_OK = 0, 20 | 21 | PARSERUTILS_NOMEM = 1, 22 | PARSERUTILS_BADPARM = 2, 23 | PARSERUTILS_INVALID = 3, 24 | PARSERUTILS_FILENOTFOUND = 4, 25 | PARSERUTILS_NEEDDATA = 5, 26 | PARSERUTILS_BADENCODING = 6, 27 | PARSERUTILS_EOF = 7 28 | } parserutils_error; 29 | 30 | /* Convert a parserutils error value to a string */ 31 | const char *parserutils_error_to_string(parserutils_error error); 32 | /* Convert a string to a parserutils error value */ 33 | parserutils_error parserutils_error_from_string(const char *str, size_t len); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /contrib/libparserutils/include/parserutils/functypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007-8 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_functypes_h_ 9 | #define parserutils_functypes_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /contrib/libparserutils/include/parserutils/parserutils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_parserutils_h_ 9 | #define parserutils_parserutils_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | #include 18 | #include 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /contrib/libparserutils/include/parserutils/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_types_h_ 9 | #define parserutils_types_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | #include 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | 25 | -------------------------------------------------------------------------------- /contrib/libparserutils/include/parserutils/utils/stack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2008 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_utils_stack_h_ 9 | #define parserutils_utils_stack_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | 21 | struct parserutils_stack; 22 | typedef struct parserutils_stack parserutils_stack; 23 | 24 | parserutils_error parserutils_stack_create(size_t item_size, size_t chunk_size, 25 | parserutils_stack **stack); 26 | parserutils_error parserutils_stack_destroy(parserutils_stack *stack); 27 | 28 | parserutils_error parserutils_stack_push(parserutils_stack *stack, 29 | const void *item); 30 | parserutils_error parserutils_stack_pop(parserutils_stack *stack, void *item); 31 | 32 | void *parserutils_stack_get_current(parserutils_stack *stack); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /contrib/libparserutils/meson.build: -------------------------------------------------------------------------------- 1 | parserutils_src = files( 2 | 'src/input/filter.c', 3 | 'src/input/inputstream.c', 4 | 'src/charset/aliases.c', 5 | 'src/charset/encodings/utf8.c', 6 | 'src/utils/buffer.c', 7 | 'src/utils/stack.c', 8 | 'src/utils/vector.c' 9 | ) 10 | 11 | library('parserutils', parserutils_src, include_directories: include_directories('src')) 12 | -------------------------------------------------------------------------------- /contrib/libparserutils/src/charset/aliases.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_charset_aliases_h_ 9 | #define parserutils_charset_aliases_h_ 10 | 11 | #include 12 | 13 | #include 14 | 15 | typedef struct parserutils_charset_aliases_canon { 16 | /* Do not change the ordering here without changing make-aliases.pl */ 17 | uint16_t mib_enum; 18 | uint16_t name_len; 19 | const char *name; 20 | } parserutils_charset_aliases_canon; 21 | 22 | /* Canonicalise an alias name */ 23 | parserutils_charset_aliases_canon *parserutils__charset_alias_canonicalise( 24 | const char *alias, size_t len); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /contrib/libparserutils/src/utils/endian.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2009 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_endian_h_ 9 | #define parserutils_endian_h_ 10 | 11 | static inline bool endian_host_is_le(void) 12 | { 13 | const uint16_t test = 1; 14 | 15 | return ((const uint8_t *) &test)[0]; 16 | } 17 | 18 | static inline uint32_t endian_swap(uint32_t val) 19 | { 20 | return ((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) | 21 | ((val & 0x0000ff00) << 8) | ((val & 0x000000ff) << 24); 22 | } 23 | 24 | static inline uint32_t endian_host_to_big(uint32_t host) 25 | { 26 | if (endian_host_is_le()) 27 | return endian_swap(host); 28 | 29 | return host; 30 | } 31 | 32 | static inline uint32_t endian_big_to_host(uint32_t big) 33 | { 34 | if (endian_host_is_le()) 35 | return endian_swap(big); 36 | 37 | return big; 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /contrib/libparserutils/src/utils/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of LibParserUtils. 3 | * Licensed under the MIT License, 4 | * http://www.opensource.org/licenses/mit-license.php 5 | * Copyright 2007 John-Mark Bell 6 | */ 7 | 8 | #ifndef parserutils_utils_h_ 9 | #define parserutils_utils_h_ 10 | 11 | #ifndef max 12 | #define max(a,b) ((a)>(b)?(a):(b)) 13 | #endif 14 | 15 | #ifndef min 16 | #define min(a,b) ((a)<(b)?(a):(b)) 17 | #endif 18 | 19 | #ifndef SLEN 20 | /* Calculate length of a string constant */ 21 | #define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */ 22 | #endif 23 | 24 | #ifndef UNUSED 25 | #define UNUSED(x) ((void)(x)) 26 | #endif 27 | 28 | #ifndef N_ELEMENTS 29 | #define N_ELEMENTS(s) (sizeof((s)) / sizeof((s)[0])) 30 | #endif 31 | 32 | #ifndef ALIGN 33 | #define ALIGN(val) (((val) + 3) & ~(3)) 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /contrib/libsvgtiny/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | execute_process(COMMAND gperf ${CMAKE_SOURCE_DIR}/contrib/libsvgtiny/src/colors.gperf --output-file=${CMAKE_BINARY_DIR}/contrib/libsvgtiny/autogenerated_colors.c RESULT_VARIABLE RET) 2 | if(NOT RET EQUAL 0) 3 | message(FATAL_ERROR "gperf for libsvgtiny failed (error ${RET})") 4 | endif() 5 | 6 | # Squash "error: no previous declaration for 'svgtiny_color_lookup'" 7 | execute_process(COMMAND sed "s/^\\(const struct svgtiny_named_color\\)/static \\1/" -i ${CMAKE_BINARY_DIR}/contrib/libsvgtiny/autogenerated_colors.c RESULT_VARIABLE RET) 8 | if(NOT RET EQUAL 0) 9 | message(FATAL_ERROR "sed for libsvgtiny failed (error ${RET})") 10 | endif() 11 | 12 | add_library(svgtiny SHARED 13 | src/svgtiny.c 14 | src/svgtiny_gradient.c 15 | src/svgtiny_list.c 16 | ) 17 | set_target_properties(svgtiny PROPERTIES SOVERSION ${NEOSURF_ABI}) 18 | 19 | target_link_libraries(svgtiny nsutils dom m) 20 | 21 | install(TARGETS svgtiny DESTINATION ${CMAKE_INSTALL_LIBDIR}) 22 | 23 | install(FILES include/svgtiny.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) 24 | -------------------------------------------------------------------------------- /contrib/libsvgtiny/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright 2007 James Bursa . 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | * The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /contrib/meson.build: -------------------------------------------------------------------------------- 1 | #subdir('libcss') 2 | #subdir('libdom') 3 | #subdir('libhubbub') 4 | subdir('libnsbmp') 5 | subdir('libnsgif') 6 | subdir('libnsutils') 7 | subdir('libparserutils') 8 | #subdir('libsvgtiny') 9 | -------------------------------------------------------------------------------- /contrib/nsgenbind/COPYING.netsurf: -------------------------------------------------------------------------------- 1 | Copyright 2012 Vincent Sanders 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | * The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /contrib/nsgenbind/src/output.h: -------------------------------------------------------------------------------- 1 | /* generated output handlers 2 | * 3 | * This file is part of nsgenbind. 4 | * Licensed under the MIT License, 5 | * http://www.opensource.org/licenses/mit-license.php 6 | * Copyright 2012 Vincent Sanders 7 | */ 8 | 9 | #ifndef nsgenbind_output_h 10 | #define nsgenbind_output_h 11 | 12 | struct opctx; 13 | 14 | /** 15 | * open output file 16 | * 17 | * opens output file and creates output context 18 | * 19 | * \param filename The filename of the file to output 20 | * \param opctx_out The resulting output context 21 | * \return 0 on success and opctx_out updated else -1 22 | */ 23 | int output_open(const char *filename, struct opctx **opctx_out); 24 | 25 | /** 26 | * close output file and free context 27 | */ 28 | int output_close(struct opctx *opctx); 29 | 30 | /** 31 | * output formatted data to file 32 | */ 33 | int outputf(struct opctx *opctx, const char *fmt, ...) __attribute__ ((format (printf, 2, 3))); 34 | 35 | int outputc(struct opctx *opctx, int c); 36 | 37 | /** 38 | * generate c comment with line directive for current outut context 39 | */ 40 | int output_line(struct opctx *opctx); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /frontends/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories("${CMAKE_SOURCE_DIR}/frontends") 2 | 3 | if(NEOSURF_BUILD_GTK_FRONTEND) 4 | add_subdirectory(gtk) 5 | endif() 6 | 7 | if(NEOSURF_BUILD_VI_FRONTEND) 8 | add_subdirectory(visurf) 9 | endif() 10 | -------------------------------------------------------------------------------- /frontends/gtk/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(PkgConfig) 2 | 3 | # Second GTK_RESPATH entry is for AppImages 4 | add_definitions(-DGTK_RESPATH="${CMAKE_INSTALL_PREFIX}/share/neosurf-gtk:./${CMAKE_INSTALL_PREFIX}/share/neosurf-gtk" -DWITH_GRESOURCE -DWITH_BUILTIN_PIXBUF -DNEOSURF_HOMEPAGE="about:welcome") 5 | 6 | pkg_check_modules(GTK REQUIRED gtk+-3.0) 7 | include_directories(${GTK_INCLUDE_DIRS}) 8 | 9 | include_directories(${CMAKE_SOURCE_DIR}/include) 10 | 11 | add_executable(neosurf-gtk 12 | gui.c 13 | misc.c 14 | schedule.c 15 | layout_pango.c 16 | bitmap.c 17 | plotters.c 18 | scaffolding.c 19 | gdk.c 20 | completion.c 21 | throbber.c 22 | accelerator.c 23 | selection.c 24 | window.c 25 | fetch.c 26 | download.c 27 | menu.c 28 | print.c 29 | search.c 30 | tabs.c 31 | toolbar.c 32 | compat.c 33 | viewdata.c 34 | viewsource.c 35 | preferences.c 36 | about.c 37 | resources.c 38 | corewindow.c 39 | local_history.c 40 | global_history.c 41 | cookies.c 42 | hotlist.c 43 | page_info.c 44 | ) 45 | 46 | target_link_libraries(neosurf-gtk neosurf m ${NEOSURF_COMMON_LIBS} ${GTK_LIBRARIES}) 47 | 48 | install(TARGETS neosurf-gtk DESTINATION ${CMAKE_INSTALL_BINDIR}) 49 | install(DIRECTORY res/ DESTINATION ${CMAKE_INSTALL_DATADIR}/neosurf-gtk) 50 | -------------------------------------------------------------------------------- /frontends/gtk/about.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Rob Kendrick 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_GTK_ABOUT_H 20 | #define NETSURF_GTK_ABOUT_H 21 | 22 | void nsgtk_about_dialog_init(GtkWindow *parent); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /frontends/gtk/accelerator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | nserror nsgtk_accelerator_init(char **respaths); 4 | const char *nsgtk_accelerator_get_desc(const char *key); 5 | -------------------------------------------------------------------------------- /frontends/gtk/fetch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Vincent Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_GTK_FETCH_H 20 | #define NETSURF_GTK_FETCH_H 21 | 22 | extern struct gui_fetch_table *nsgtk_fetch_table; 23 | 24 | void gtk_fetch_filetype_init(const char *mimefile); 25 | void gtk_fetch_filetype_fin(void); 26 | const char *fetch_filetype(const char *unix_path); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /frontends/gtk/misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 Vincemt Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_GTK_MISC_H 20 | #define NETSURF_GTK_MISC_H 1 21 | 22 | extern struct gui_misc_table *nsgtk_misc_table; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /frontends/gtk/preferences.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 Vincent Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_GTK_PREFERENCES_H 20 | #define NETSURF_GTK_PREFERENCES_H 21 | 22 | #include 23 | 24 | /** Initialise prefernces window 25 | */ 26 | GtkWidget* nsgtk_preferences(struct browser_window *bw, GtkWindow *parent); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /frontends/gtk/res/Messages: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/Messages -------------------------------------------------------------------------------- /frontends/gtk/res/accelerators: -------------------------------------------------------------------------------- 1 | # GTK accelerator keys for menu entries 2 | # The keys must match those in the menus to be applied 3 | # 4 | # These are passed to gtk_accelerator_parse and must not be translated 5 | # The key names are the same as those in the gdk/gdkkeysyms.h header file 6 | # but without the leading “GDK_KEY_”. 7 | 8 | gtkNextTab:Page_Down 9 | gtkPrevTab:Page_Up 10 | gtkCloseTab:w 11 | gtkNewTab:t 12 | gtkNewWindow:n 13 | gtkOpenFile:o 14 | gtkCloseWindow:w 15 | gtkSavePage:s 16 | gtkPrintPreview:p 17 | gtkPrint:p 18 | gtkQuitMenu:q 19 | gtkCut:x 20 | gtkCopy:c 21 | gtkPaste:v 22 | gtkSelectAll:a 23 | gtkFind:f 24 | gtkStop:Escape 25 | gtkReload:F5 26 | gtkZoomPlus:plus 27 | gtkZoomMinus:minus 28 | gtkZoomNormal:0 29 | gtkFullScreen:F11 30 | gtkPageSource:U 31 | gtkDownloads:j 32 | gtkBack:Left 33 | gtkForward:Right 34 | gtkHome:Down 35 | gtkLocalHistory:h 36 | gtkGlobalHistory:h 37 | gtkAddBookMarks:d 38 | gtkShowBookMarks:F6 39 | gtkShowCookies:F9 40 | gtkOpenLocation:l 41 | -------------------------------------------------------------------------------- /frontends/gtk/res/adblock.css: -------------------------------------------------------------------------------- 1 | ../neosurf/adblock.css -------------------------------------------------------------------------------- /frontends/gtk/res/credits.html: -------------------------------------------------------------------------------- 1 | ../neosurf/credits.html -------------------------------------------------------------------------------- /frontends/gtk/res/default.css: -------------------------------------------------------------------------------- 1 | ../neosurf/default.css -------------------------------------------------------------------------------- /frontends/gtk/res/default.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/default.ico -------------------------------------------------------------------------------- /frontends/gtk/res/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/favicon.png -------------------------------------------------------------------------------- /frontends/gtk/res/icons: -------------------------------------------------------------------------------- 1 | ../neosurf/icons -------------------------------------------------------------------------------- /frontends/gtk/res/internal.css: -------------------------------------------------------------------------------- 1 | ../neosurf/internal.css -------------------------------------------------------------------------------- /frontends/gtk/res/license.html: -------------------------------------------------------------------------------- 1 | ../neosurf/license.html -------------------------------------------------------------------------------- /frontends/gtk/res/menu_cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/menu_cursor.png -------------------------------------------------------------------------------- /frontends/gtk/res/menu_cursor.xbm: -------------------------------------------------------------------------------- 1 | #define menu_cursor_width 16 2 | #define menu_cursor_height 16 3 | static char menu_cursor_bits[] = { 4 | 0x00, 0x00, 0x80, 0x7F, 0x88, 0x40, 0x9E, 0x5E, 0x88, 0x40, 0x80, 0x56, 5 | 0x80, 0x40, 0x80, 0x5A, 0x80, 0x40, 0x80, 0x5E, 0x80, 0x40, 0x80, 0x56, 6 | 0x80, 0x40, 0x80, 0x7F, 0x00, 0x00, 0x00, 0x00 }; 7 | -------------------------------------------------------------------------------- /frontends/gtk/res/menu_cursor_mask.xbm: -------------------------------------------------------------------------------- 1 | #define menu_cursor_mask_width 16 2 | #define menu_cursor_mask_height 16 3 | static char menu_cursor_mask_bits[] = { 4 | 0xC0, 0xFF, 0xC8, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xC8, 0xFF, 5 | 0xC0, 0xFF, 0xC0, 0xFF, 0xC0, 0xFF, 0xC0, 0xFF, 0xC0, 0xFF, 0xC0, 0xFF, 6 | 0xC0, 0xFF, 0xC0, 0xFF, 0xC0, 0xFF, 0x00, 0x00 }; 7 | -------------------------------------------------------------------------------- /frontends/gtk/res/menu_cursor_mask.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * menu_cursor_mask_xpm[] = { 3 | "16 16 3 1", 4 | " c None", 5 | ". c #FFFFFF", 6 | "+ c #000000", 7 | " ..........", 8 | " . .++++++++.", 9 | "...+. .+......+.", 10 | ".++++..+.++++.+.", 11 | "...+. .+......+.", 12 | " . .+.++.+.+.", 13 | " .+......+.", 14 | " .+.+.++.+.", 15 | " .+......+.", 16 | " .+.++++.+.", 17 | " .+......+.", 18 | " .+.++.+.+.", 19 | " .+......+.", 20 | " .++++++++.", 21 | " ..........", 22 | " "}; 23 | -------------------------------------------------------------------------------- /frontends/gtk/res/messages.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Messages 5 | 6 | 7 | -------------------------------------------------------------------------------- /frontends/gtk/res/neosurf-gtk.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=NeoSurf 3 | Comment=Browse the Internet 4 | GenericName=Web Browser 5 | Exec=neosurf-gtk %u 6 | Terminal=false 7 | X-MultipleArgs=false 8 | Type=Application 9 | Icon=neosurf.png 10 | Categories=Network; 11 | MimeType=text/html;text/xml;application/xhtml+xml;application/xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https 12 | StartupWMClass=NeoSurf-bin 13 | StartupNotify=true 14 | -------------------------------------------------------------------------------- /frontends/gtk/res/neosurf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/neosurf.png -------------------------------------------------------------------------------- /frontends/gtk/res/pageinfo.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GTK_WINDOW_POPUP 7 | False 8 | GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_STRUCTURE_MASK 9 | False 10 | 11 | 12 | 13 | 14 | 15 | PGIDrawingArea 16 | True 17 | False 18 | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber0.png -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber1.png -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber2.png -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber3.png -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber4.png -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber5.png -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber6.png -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber7.png -------------------------------------------------------------------------------- /frontends/gtk/res/throbber/throbber8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/frontends/gtk/res/throbber/throbber8.png -------------------------------------------------------------------------------- /frontends/gtk/res/ui.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | cookies.ui 5 | downloads.ui 6 | globalhistory.ui 7 | hotlist.ui 8 | localhistory.ui 9 | netsurf.ui 10 | options.ui 11 | pageinfo.ui 12 | password.ui 13 | tabcontents.ui 14 | toolbar.ui 15 | viewdata.ui 16 | warning.ui 17 | 18 | 19 | -------------------------------------------------------------------------------- /frontends/gtk/res/welcome.html: -------------------------------------------------------------------------------- 1 | ../neosurf/welcome.html -------------------------------------------------------------------------------- /frontends/gtk/schedule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Daniel Silverstone 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_GTK_CALLBACK_H 20 | #define NETSURF_GTK_CALLBACK_H 1 21 | 22 | nserror nsgtk_schedule(int t, void (*callback)(void *p), void *p); 23 | 24 | bool schedule_run(void); 25 | 26 | #endif /* NETSURF_GTK_CALLBACK_H */ 27 | -------------------------------------------------------------------------------- /frontends/gtk/selection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Mike Lester 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef GTK_SELECTION_H 20 | #define GTK_SELECTION_H 21 | 22 | extern struct gui_clipboard_table *nsgtk_clipboard_table; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /frontends/gtk/viewsource.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Vincent Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef _NETSURF_GTK_VIEWSOURCE_H_ 20 | #define _NETSURF_GTK_VIEWSOURCE_H_ 21 | 22 | nserror nsgtk_viewsource(GtkWindow *parent, struct browser_window *bw); 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /frontends/visurf/bitmap.h: -------------------------------------------------------------------------------- 1 | #ifndef NETSURF_VI_BITMAP_H 2 | #define NETSURF_VI_BITMAP_H 3 | 4 | #include 5 | 6 | struct gui_bitmap_table; 7 | extern struct gui_bitmap_table vi_bitmap_table; 8 | 9 | struct bitmap { 10 | cairo_surface_t *surface; 11 | cairo_surface_t *scsurface; 12 | bool converted; 13 | }; 14 | 15 | int nsvi_bitmap_get_width(void *vbitmap); 16 | int nsvi_bitmap_get_height(void *vbitmap); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /frontends/visurf/commands.h: -------------------------------------------------------------------------------- 1 | #ifndef NETSURF_VI_COMMANDS 2 | #define NETSURF_VI_COMMANDS 3 | 4 | void nsvi_command(void *user, const char *cmd); 5 | int nsvi_command_source(void *user, const char *filepath); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /frontends/visurf/fetch.h: -------------------------------------------------------------------------------- 1 | #ifndef NETSURF_VI_FETCH_H 2 | #define NETSURF_VI_FETCH_H 3 | 4 | struct gui_fetch_table; 5 | extern struct gui_fetch_table vi_fetch_table; 6 | 7 | void nsvi_fetch_filetype_init(const char *mimefile); 8 | void nsvi_fetch_filetype_fini(void); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /frontends/visurf/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef NETSURF_GETOPT_H 2 | #define NETSURF_GETOPT_H 3 | 4 | extern char *ns_optarg; 5 | extern int ns_opterr, ns_optind, ns_optopt; 6 | 7 | int ns_getopt(int argc, char * const argv[], const char *optstring); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /frontends/visurf/layout.h: -------------------------------------------------------------------------------- 1 | #ifndef NETSURF_VI_LAYOUT_H 2 | #define NETSURF_VI_LAYOUT_H 3 | #include 4 | #include 5 | 6 | struct plot_font_style; 7 | 8 | nserror nsfont_paint(int x, int y, const char *string, size_t length, const struct plot_font_style *fstyle); 9 | 10 | /** 11 | * Convert a plot style to a PangoFontDescription. 12 | * 13 | * \param fstyle plot style for this text 14 | * \return A new Pango font description 15 | */ 16 | PangoFontDescription *nsfont_style_to_description(const struct plot_font_style *fstyle); 17 | 18 | 19 | void pango_printf(cairo_t *cairo, const char *font, const char *fmt, ...); 20 | void get_text_size(cairo_t *cairo, const char *font, int *width, int *height, 21 | int *baseline, const char *fmt, ...); 22 | 23 | struct gui_layout_table; 24 | extern struct gui_layout_table vi_layout_table; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /frontends/visurf/plotters.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2005 James Bursa 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * Target independent plotting GTK+ interface. 22 | */ 23 | 24 | #ifndef NETSURF_VI_PLOTTERS_H 25 | #define NETSURF_VI_PLOTTERS_H 1 26 | #include 27 | 28 | struct plotter_table; 29 | 30 | extern const struct plotter_table nsvi_plotters; 31 | 32 | void nsvi_set_colour(colour c); 33 | void nsvi_plot_caret(int x, int y, int h); 34 | 35 | #endif /* NETSURF_GTK_PLOTTERS_H */ 36 | 37 | -------------------------------------------------------------------------------- /frontends/visurf/pool-buffer.h: -------------------------------------------------------------------------------- 1 | #ifndef _SWAY_BUFFERS_H 2 | #define _SWAY_BUFFERS_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | struct pool_buffer { 10 | struct wl_buffer *buffer; 11 | cairo_surface_t *surface; 12 | cairo_t *cairo; 13 | PangoContext *pango; 14 | PangoLayout *layout; 15 | uint32_t width, height; 16 | int scale; 17 | void *data; 18 | size_t size; 19 | bool busy; 20 | }; 21 | 22 | struct pool_buffer *get_next_buffer(struct wl_shm *shm, 23 | struct pool_buffer pool[static 2], 24 | uint32_t width, uint32_t height, 25 | int scale); 26 | void destroy_buffer(struct pool_buffer *buffer); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /frontends/visurf/res: -------------------------------------------------------------------------------- 1 | ../gtk/res -------------------------------------------------------------------------------- /frontends/visurf/undo.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "visurf/undo.h" 3 | 4 | void nsvi_undo_tab_new(nsurl *url) { 5 | struct nsvi_undo *undo = calloc(1, sizeof(struct nsvi_undo)); 6 | undo->kind = UNDO_TAB; 7 | undo->urls = calloc(1, sizeof(nsurl *)); 8 | undo->nurl = 1; 9 | undo->urls[0] = url; 10 | undo->next = global_state->undo; 11 | global_state->undo = undo; 12 | } 13 | 14 | void nsvi_undo_window_new(void) { 15 | assert(0); // TODO 16 | } 17 | 18 | void nsvi_undo_free(struct nsvi_undo *undo) { 19 | for (size_t i = 0; i < undo->nurl; ++i) { 20 | nsurl_unref(undo->urls[i]); 21 | } 22 | 23 | free(undo->urls); 24 | global_state->undo = undo->next; 25 | free(undo); 26 | } 27 | 28 | void nsvi_undo_finish(void) { 29 | while (global_state->undo) { 30 | nsvi_undo_free(global_state->undo); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /frontends/visurf/undo.h: -------------------------------------------------------------------------------- 1 | #ifndef NETSURF_VI_UNDO_H 2 | #define NETSURF_VI_UNDO_H 3 | 4 | #include "visurf/visurf.h" 5 | 6 | enum nsvi_undo_kind { 7 | UNDO_TAB, 8 | UNDO_WIN, 9 | }; 10 | 11 | struct nsvi_undo { 12 | enum nsvi_undo_kind kind; 13 | nsurl **urls; 14 | size_t nurl; 15 | struct nsvi_undo *next; 16 | }; 17 | 18 | void nsvi_undo_tab_new(nsurl *url); 19 | 20 | void nsvi_undo_window_new(void); 21 | 22 | void nsvi_undo_free(struct nsvi_undo *undo); 23 | 24 | void nsvi_undo_finish(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /img/scr1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/img/scr1.png -------------------------------------------------------------------------------- /img/scr2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/img/scr2.png -------------------------------------------------------------------------------- /include/neosurf/desktop/gui_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Vincent Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * 22 | * Interface to core interface table. 23 | * 24 | * \note must not be used by frontends directly. 25 | */ 26 | 27 | #ifndef _NETSURF_DESKTOP_GUI_INTERNAL_H_ 28 | #define _NETSURF_DESKTOP_GUI_INTERNAL_H_ 29 | 30 | #include 31 | 32 | /** 33 | * The global operation table. 34 | */ 35 | extern struct neosurf_table *guit; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /include/neosurf/desktop/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Vincent Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * 22 | * Version information interface. 23 | */ 24 | 25 | #ifndef _NETSURF_DESKTOP_VERSION_H_ 26 | #define _NETSURF_DESKTOP_VERSION_H_ 27 | 28 | /** 29 | * NeoSurf browser version number. 30 | */ 31 | extern const int neosurf_version; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('neosurf', 2 | 'c', 3 | license: ['GPL2'], 4 | version: files('neosurf_version') 5 | ) 6 | 7 | add_project_arguments('-DNEOSURF_VERSION=' + meson.project_version(), language: 'c') 8 | 9 | bld_dir = meson.project_build_root() 10 | src_dir = meson.project_source_root() 11 | 12 | subdir('contrib') 13 | 14 | #subdir('src') 15 | -------------------------------------------------------------------------------- /neosurf_version: -------------------------------------------------------------------------------- 1 | 17 2 | -------------------------------------------------------------------------------- /src/content/fetchers/about/about.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vincent Sanders 3 | * 4 | * This file is part of NetSurf. 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * about scheme URL method handler 22 | */ 23 | 24 | #ifndef NETSURF_CONTENT_FETCHERS_ABOUT_ABOUT_H 25 | #define NETSURF_CONTENT_FETCHERS_ABOUT_ABOUT_H 26 | 27 | /** 28 | * Register about scheme handler. 29 | * 30 | * \return NSERROR_OK on successful registration or error code on failure. 31 | */ 32 | nserror fetch_about_register(void); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/content/fetchers/about/blank.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Vincent Sanders 3 | * 4 | * This file is part of NetSurf. 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * about scheme blank handler interface 22 | */ 23 | 24 | #ifndef NETSURF_CONTENT_FETCHERS_ABOUT_BLANK_H 25 | #define NETSURF_CONTENT_FETCHERS_ABOUT_BLANK_H 26 | 27 | /** 28 | * Handler to generate about scheme blank page. 29 | * 30 | * \param ctx The fetcher context. 31 | * \return true if handled false if aborted. 32 | */ 33 | bool fetch_about_blank_handler(struct fetch_about_context *ctx); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/content/fetchers/about/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Vincent Sanders 3 | * 4 | * This file is part of NetSurf. 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * about scheme config handler interface 22 | */ 23 | 24 | #ifndef NETSURF_CONTENT_FETCHERS_ABOUT_CONFIG_H 25 | #define NETSURF_CONTENT_FETCHERS_ABOUT_CONFIG_H 26 | 27 | /** 28 | * Handler to generate about scheme config page. 29 | * 30 | * \param ctx The fetcher context. 31 | * \return true if handled false if aborted. 32 | */ 33 | bool fetch_about_config_handler(struct fetch_about_context *ctx); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/content/fetchers/about/nscolours.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Vincent Sanders 3 | * 4 | * This file is part of NetSurf. 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * about scheme nscolours handler interface 22 | */ 23 | 24 | #ifndef NETSURF_CONTENT_FETCHERS_ABOUT_NSCOLOURS_H 25 | #define NETSURF_CONTENT_FETCHERS_ABOUT_NSCOLOURS_H 26 | 27 | /** 28 | * Handler to generate the nscolours stylesheet 29 | * 30 | * \param ctx The fetcher context. 31 | * \return true if handled false if aborted. 32 | */ 33 | bool fetch_about_nscolours_handler(struct fetch_about_context *ctx); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/content/fetchers/data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 Rob Kendrick 3 | * 4 | * This file is part of NetSurf. 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * data scheme fetch handler interface. 22 | */ 23 | 24 | #ifndef NETSURF_CONTENT_FETCHERS_FETCH_DATA_H 25 | #define NETSURF_CONTENT_FETCHERS_FETCH_DATA_H 26 | 27 | /** 28 | * Register data scheme handler. 29 | * 30 | * \return NSERROR_OK on successful registration or error code on failure. 31 | */ 32 | nserror fetch_data_register(void); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/content/fetchers/file/file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Vincent Sanders 3 | * 4 | * This file is part of NetSurf. 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * file scheme fetcher handler interface. 22 | */ 23 | 24 | #ifndef NETSURF_CONTENT_FETCHERS_FETCH_FILE_H 25 | #define NETSURF_CONTENT_FETCHERS_FETCH_FILE_H 26 | 27 | /** 28 | * Register file scheme handler. 29 | * 30 | * \return NSERROR_OK on successful registration or error code on failure. 31 | */ 32 | nserror fetch_file_register(void); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/content/handlers/css/dump.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 John-Mark Bell 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_CSS_DUMP_H_ 20 | #define NETSURF_CSS_DUMP_H_ 21 | 22 | /** 23 | * Dump a computed style \a style to the give file handle \a stream. 24 | * 25 | * \param stream Stream to write to 26 | * \param style Computed style to dump 27 | */ 28 | void nscss_dump_computed_style(FILE *stream, const css_computed_style *style); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/content/handlers/image/bmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Richard Wilson 3 | * Copyright 2008 Sean Fox 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * NetSurf is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; version 2 of the License. 10 | * 11 | * NetSurf is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | /** 21 | * \file 22 | * interface to image/bmp content handler initialisation. 23 | */ 24 | 25 | #ifndef NETSURF_IMAGE_BMP_H_ 26 | #define NETSURF_IMAGE_BMP_H_ 27 | 28 | nserror nsbmp_init(void); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/content/handlers/image/gif.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004 Richard Wilson 3 | * Copyright 2008 Sean Fox 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * NetSurf is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; version 2 of the License. 10 | * 11 | * NetSurf is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | /** \file 21 | * Content for image/gif (interface). 22 | */ 23 | 24 | #ifndef _NETSURF_IMAGE_GIF_H_ 25 | #define _NETSURF_IMAGE_GIF_H_ 26 | 27 | nserror nsgif_init(void); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/content/handlers/image/ico.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 Richard Wilson 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** \file 20 | * Content for image/ico (interface). 21 | */ 22 | 23 | #ifndef _NETSURF_IMAGE_ICO_H_ 24 | #define _NETSURF_IMAGE_ICO_H_ 25 | 26 | nserror nsico_init(void); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/content/handlers/image/jpeg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2004 James Bursa 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** \file 20 | * Content for image/jpeg (interface). 21 | */ 22 | 23 | #ifndef _NETSURF_IMAGE_JPEG_H_ 24 | #define _NETSURF_IMAGE_JPEG_H_ 25 | 26 | nserror nsjpeg_init(void); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/content/handlers/image/png.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2003 James Bursa 3 | * Copyright 2008 Daniel Silverstone 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * NetSurf is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; version 2 of the License. 10 | * 11 | * NetSurf is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #ifndef _NETSURF_RISCOS_PNG_H_ 21 | #define _NETSURF_RISCOS_PNG_H_ 22 | 23 | nserror nspng_init(void); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /src/content/handlers/image/svg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-2008 James Bursa 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** \file 20 | * Content for image/svg (interface). 21 | */ 22 | 23 | #ifndef _NETSURF_IMAGE_SVG_H_ 24 | #define _NETSURF_IMAGE_SVG_H_ 25 | 26 | nserror svg_init(void); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/content/handlers/image/video.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 John-Mark Bell 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_IMAGE_VIDEO_H_ 20 | #define NETSURF_IMAGE_VIDEO_H_ 21 | 22 | #include 23 | 24 | nserror nsvideo_init(void); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/content/handlers/image/webp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Vincent Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** 20 | * \file 21 | * Interface to image/webp content handlers 22 | */ 23 | 24 | #ifndef _NETSURF_IMAGE_WEBP_H_ 25 | #define _NETSURF_IMAGE_WEBP_H_ 26 | 27 | nserror nswebp_init(void); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/WebIDL/console.idl: -------------------------------------------------------------------------------- 1 | // de facto set of features for console object 2 | // https://developer.mozilla.org/en-US/docs/DOM/console 3 | // http://msdn.microsoft.com/en-us/library/dd565625%28v=vs.85%29.aspx#consolelogging 4 | // 31st October 5 | // Yay for non-standard standards 6 | 7 | interface Console { 8 | void debug(DOMString msg, Substitition... subst); 9 | void dir(JSObject object); 10 | void error(DOMString msg, Substitition... subst); 11 | void group(); 12 | void groupCollapsed(); 13 | void groupEnd(); 14 | void info(DOMString msg, Substitition... subst); 15 | void log(DOMString msg, Substitition... subst); 16 | void time(DOMString timerName); 17 | void timeEnd(DOMString timerName); 18 | void trace(); 19 | void warn(DOMString msg, Substitition... subst); 20 | }; 21 | 22 | partial interface Window { 23 | readonly attribute Console console; 24 | }; -------------------------------------------------------------------------------- /src/content/handlers/javascript/WebIDL/dom-parsing.idl: -------------------------------------------------------------------------------- 1 | // Retrieved from http://www.w3.org/TR/DOM-Parsing/ 2 | // Wed Nov 4 15:39:43 GMT 2015 3 | // Manually extracted IDL 4 | 5 | enum SupportedType { 6 | "text/html", 7 | "text/xml", 8 | "application/xml", 9 | "application/xhtml+xml", 10 | "image/svg+xml" 11 | }; 12 | 13 | [Constructor] 14 | interface DOMParser { 15 | [NewObject] 16 | Document parseFromString (DOMString str, SupportedType type); 17 | }; 18 | 19 | [Constructor] 20 | interface XMLSerializer { 21 | DOMString serializeToString (Node root); 22 | }; 23 | 24 | partial interface Element { 25 | [TreatNullAs=EmptyString] 26 | attribute DOMString innerHTML; 27 | [TreatNullAs=EmptyString] 28 | attribute DOMString outerHTML; 29 | void insertAdjacentHTML (DOMString position, DOMString text); 30 | }; 31 | 32 | partial interface Range { 33 | [NewObject] 34 | DocumentFragment createContextualFragment (DOMString fragment); 35 | }; 36 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/content.h: -------------------------------------------------------------------------------- 1 | nserror javascript_init(void); 2 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/CSSRule.bnd: -------------------------------------------------------------------------------- 1 | /* CSS Rule binding for NetSurf using duktape and libcss/libdom 2 | * 3 | * Copyright 2022 Daniel Silverstone 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | /* Note, for now this exists purely to block warnings, eventually 12 | * rules will have to come from stylesheets etc. 13 | */ 14 | 15 | class CSSRule { 16 | private bool unused; 17 | }; 18 | 19 | init CSSRule() 20 | %{ 21 | priv->unused = true; 22 | %} 23 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/CSSStyleSheet.bnd: -------------------------------------------------------------------------------- 1 | /* CSS Stylesheet binding for NetSurf using duktape and libcss/libdom 2 | * 3 | * Copyright 2022 Daniel Silverstone 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | /* Note, for now this exists purely to block warnings, eventually 12 | * stylesheets will have to come from documents etc. 13 | */ 14 | 15 | class CSSStyleSheet { 16 | private bool unused; 17 | }; 18 | 19 | init CSSStyleSheet() 20 | %{ 21 | priv->unused = true; 22 | %} 23 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLAnchorElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML anchor element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLAnchorElement(struct dom_html_element *html_anchor_element::html_element); 12 | 13 | getter HTMLAnchorElement::charset(); 14 | setter HTMLAnchorElement::charset(); 15 | 16 | getter HTMLAnchorElement::coords(); 17 | setter HTMLAnchorElement::coords(); 18 | 19 | getter HTMLAnchorElement::hreflang(); 20 | setter HTMLAnchorElement::hreflang(); 21 | 22 | getter HTMLAnchorElement::name(); 23 | setter HTMLAnchorElement::name(); 24 | 25 | getter HTMLAnchorElement::rel(); 26 | setter HTMLAnchorElement::rel(); 27 | 28 | getter HTMLAnchorElement::rev(); 29 | setter HTMLAnchorElement::rev(); 30 | 31 | getter HTMLAnchorElement::shape(); 32 | setter HTMLAnchorElement::shape(); 33 | 34 | getter HTMLAnchorElement::target(); 35 | setter HTMLAnchorElement::target(); 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLAppletElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML applet element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLAppletElement(struct dom_html_element *html_applet_element::html_element); 12 | 13 | getter HTMLAppletElement::align(); 14 | setter HTMLAppletElement::align(); 15 | getter HTMLAppletElement::alt(); 16 | setter HTMLAppletElement::alt(); 17 | getter HTMLAppletElement::archive(); 18 | setter HTMLAppletElement::archive(); 19 | getter HTMLAppletElement::codeBase(); 20 | setter HTMLAppletElement::codeBase(); 21 | getter HTMLAppletElement::code(); 22 | setter HTMLAppletElement::code(); 23 | getter HTMLAppletElement::height(); 24 | setter HTMLAppletElement::height(); 25 | getter HTMLAppletElement::name(); 26 | setter HTMLAppletElement::name(); 27 | getter HTMLAppletElement::object(); 28 | setter HTMLAppletElement::object(); 29 | getter HTMLAppletElement::width(); 30 | setter HTMLAppletElement::width(); 31 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLAreaElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML area element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLAreaElement(struct dom_html_element *html_area_element::html_element); 12 | 13 | getter HTMLAreaElement::alt(); 14 | setter HTMLAreaElement::alt(); 15 | 16 | getter HTMLAreaElement::coords(); 17 | setter HTMLAreaElement::coords(); 18 | 19 | getter HTMLAreaElement::noHref(); 20 | setter HTMLAreaElement::noHref(); 21 | 22 | getter HTMLAreaElement::shape(); 23 | setter HTMLAreaElement::shape(); 24 | 25 | getter HTMLAreaElement::target(); 26 | setter HTMLAreaElement::target(); 27 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLBRElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML br element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLBRElement(struct dom_html_element *html_br_element::html_element); 12 | 13 | getter HTMLBRElement::clear(); 14 | setter HTMLBRElement::clear(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLBaseElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML base element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLBaseElement(struct dom_html_element *html_base_element::html_element); 12 | 13 | getter HTMLBaseElement::href(); 14 | setter HTMLBaseElement::href(); 15 | 16 | getter HTMLBaseElement::target(); 17 | setter HTMLBaseElement::target(); 18 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLButtonElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML button element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLButtonElement(struct dom_html_element *html_button_element::html_element); 12 | 13 | getter HTMLButtonElement::disabled(); 14 | setter HTMLButtonElement::disabled(); 15 | getter HTMLButtonElement::name(); 16 | setter HTMLButtonElement::name(); 17 | getter HTMLButtonElement::value(); 18 | setter HTMLButtonElement::value(); 19 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLCollection.bnd: -------------------------------------------------------------------------------- 1 | /* HTMLCollection binding for browser using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | class HTMLCollection { 12 | private struct dom_html_collection *coll; 13 | }; 14 | 15 | init HTMLCollection(struct dom_html_collection *coll) 16 | %{ 17 | priv->coll = coll; 18 | dom_html_collection_ref(coll); 19 | %} 20 | 21 | fini HTMLCollection() 22 | %{ 23 | dom_html_collection_unref(priv->coll); 24 | %} 25 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLDivElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML div element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Michael Drake 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLDivElement(struct dom_html_element *html_div_element::html_element); 12 | 13 | getter HTMLDivElement::align(); 14 | setter HTMLDivElement::align(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLFontElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML font element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLFontElement(struct dom_html_element *html_font_element::html_element); 12 | 13 | getter HTMLFontElement::color(); 14 | setter HTMLFontElement::color(); 15 | 16 | getter HTMLFontElement::face(); 17 | setter HTMLFontElement::face(); 18 | 19 | getter HTMLFontElement::size(); 20 | setter HTMLFontElement::size(); 21 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLFormElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML form element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLFormElement(struct dom_html_element *html_form_element::html_element); 12 | 13 | getter HTMLFormElement::acceptCharset(); 14 | setter HTMLFormElement::acceptCharset(); 15 | 16 | getter HTMLFormElement::action(); 17 | setter HTMLFormElement::action(); 18 | 19 | getter HTMLFormElement::enctype(); 20 | setter HTMLFormElement::enctype(); 21 | 22 | getter HTMLFormElement::method(); 23 | setter HTMLFormElement::method(); 24 | 25 | getter HTMLFormElement::target(); 26 | setter HTMLFormElement::target(); 27 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLFrameElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML frame element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLFrameElement(struct dom_html_element *html_frame_element::html_element); 12 | 13 | getter HTMLFrameElement::frameBorder(); 14 | setter HTMLFrameElement::frameBorder(); 15 | 16 | getter HTMLFrameElement::longDesc(); 17 | setter HTMLFrameElement::longDesc(); 18 | 19 | getter HTMLFrameElement::marginHeight(); 20 | setter HTMLFrameElement::marginHeight(); 21 | 22 | getter HTMLFrameElement::marginWidth(); 23 | setter HTMLFrameElement::marginWidth(); 24 | 25 | getter HTMLFrameElement::name(); 26 | setter HTMLFrameElement::name(); 27 | 28 | getter HTMLFrameElement::noResize(); 29 | setter HTMLFrameElement::noResize(); 30 | 31 | getter HTMLFrameElement::scrolling(); 32 | setter HTMLFrameElement::scrolling(); 33 | 34 | getter HTMLFrameElement::src(); 35 | setter HTMLFrameElement::src(); 36 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLHRElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML hr element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLHRElement(struct dom_html_element *html_hr_element::html_element); 12 | 13 | getter HTMLHRElement::noShade(); 14 | setter HTMLHRElement::noShade(); 15 | 16 | getter HTMLHRElement::align(); 17 | setter HTMLHRElement::align(); 18 | 19 | getter HTMLHRElement::size(); 20 | setter HTMLHRElement::size(); 21 | 22 | getter HTMLHRElement::width(); 23 | setter HTMLHRElement::width(); 24 | 25 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLHTMLElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML html element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLHtmlElement(struct dom_html_element *html_html_element::html_element); 12 | 13 | getter HTMLHtmlElement::version(); 14 | setter HTMLHtmlElement::version(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLHeadingElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML heading element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLHeadingElement(struct dom_html_element *html_heading_element::html_element); 12 | 13 | getter HTMLHeadingElement::align(); 14 | setter HTMLHeadingElement::align(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLLIElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML li element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLLIElement(struct dom_html_element *html_li_element::html_element); 12 | 13 | getter HTMLLIElement::type(); 14 | setter HTMLLIElement::type(); 15 | 16 | getter HTMLLIElement::value(); 17 | setter HTMLLIElement::value(); 18 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLLabelElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML label element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLLabelElement(struct dom_html_element *html_label_element::html_element); 12 | 13 | getter HTMLLabelElement::htmlFor(); 14 | setter HTMLLabelElement::htmlFor(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLLegendElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML legend element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLLegendElement(struct dom_html_element *html_legend_element::html_element); 12 | 13 | getter HTMLLegendElement::align(); 14 | setter HTMLLegendElement::align(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLLinkElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML link element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLLinkElement(struct dom_html_element *html_link_element::html_element); 12 | 13 | getter HTMLLinkElement::charset(); 14 | setter HTMLLinkElement::charset(); 15 | 16 | getter HTMLLinkElement::hreflang(); 17 | setter HTMLLinkElement::hreflang(); 18 | 19 | getter HTMLLinkElement::href(); 20 | setter HTMLLinkElement::href(); 21 | 22 | getter HTMLLinkElement::media(); 23 | setter HTMLLinkElement::media(); 24 | 25 | getter HTMLLinkElement::rel(); 26 | setter HTMLLinkElement::rel(); 27 | 28 | getter HTMLLinkElement::rev(); 29 | setter HTMLLinkElement::rev(); 30 | 31 | getter HTMLLinkElement::target(); 32 | setter HTMLLinkElement::target(); 33 | 34 | getter HTMLLinkElement::type(); 35 | setter HTMLLinkElement::type(); 36 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLMapElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML map element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLMapElement(struct dom_html_element *html_map_element::html_element); 12 | 13 | getter HTMLMapElement::name(); 14 | setter HTMLMapElement::name(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLMarqueeElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML marquee element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLMarqueeElement(struct dom_html_element *html_marquee_element::html_element); 12 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLMenuElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML menu element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLMenuElement(struct dom_html_element *html_menu_element::html_element); 12 | 13 | getter HTMLMenuElement::compact(); 14 | setter HTMLMenuElement::compact(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLMetaElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML meta element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLMetaElement(struct dom_html_element *html_meta_element::html_element); 12 | 13 | getter HTMLMetaElement::content(); 14 | setter HTMLMetaElement::content(); 15 | 16 | getter HTMLMetaElement::httpEquiv(); 17 | setter HTMLMetaElement::httpEquiv(); 18 | 19 | getter HTMLMetaElement::name(); 20 | setter HTMLMetaElement::name(); 21 | 22 | getter HTMLMetaElement::scheme(); 23 | setter HTMLMetaElement::scheme(); 24 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLOListElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML ol element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLOListElement(struct dom_html_element *html_o_list_element::html_element); 12 | 13 | getter HTMLOListElement::compact(); 14 | setter HTMLOListElement::compact(); 15 | getter HTMLOListElement::start(); 16 | setter HTMLOListElement::start(); 17 | getter HTMLOListElement::type(); 18 | setter HTMLOListElement::type(); 19 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLOptionElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML option element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLOptionElement(struct dom_html_element *html_option_element::html_element); 12 | 13 | getter HTMLOptionElement::defaultSelected(); 14 | setter HTMLOptionElement::defaultSelected(); 15 | 16 | getter HTMLOptionElement::disabled(); 17 | setter HTMLOptionElement::disabled(); 18 | 19 | getter HTMLOptionElement::label(); 20 | setter HTMLOptionElement::label(); 21 | 22 | getter HTMLOptionElement::selected(); 23 | setter HTMLOptionElement::selected(); 24 | 25 | getter HTMLOptionElement::text(); 26 | 27 | getter HTMLOptionElement::value(); 28 | setter HTMLOptionElement::value(); 29 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLParagraphElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML paragraph element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLParagraphElement(struct dom_html_element *html_paragraph_element::html_element); 12 | 13 | getter HTMLParagraphElement::align(); 14 | setter HTMLParagraphElement::align(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLParamElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML param element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLParamElement(struct dom_html_element *html_param_element::html_element); 12 | 13 | getter HTMLParamElement::name(); 14 | setter HTMLParamElement::name(); 15 | 16 | getter HTMLParamElement::type(); 17 | setter HTMLParamElement::type(); 18 | 19 | getter HTMLParamElement::value(); 20 | setter HTMLParamElement::value(); 21 | 22 | getter HTMLParamElement::valueType(); 23 | setter HTMLParamElement::valueType(); 24 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLPreElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML li element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLPreElement(struct dom_html_element *html_pre_element::html_element); 12 | 13 | getter HTMLPreElement::width(); 14 | setter HTMLPreElement::width(); 15 | 16 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLQuoteElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML quote element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLQuoteElement(struct dom_html_element *html_quote_element::html_element); 12 | 13 | getter HTMLQuoteElement::cite(); 14 | setter HTMLQuoteElement::cite(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLScriptElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML script element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLScriptElement(struct dom_html_element *html_script_element::html_element); 12 | 13 | getter HTMLScriptElement::charset(); 14 | setter HTMLScriptElement::charset(); 15 | 16 | getter HTMLScriptElement::defer(); 17 | setter HTMLScriptElement::defer(); 18 | 19 | getter HTMLScriptElement::event(); 20 | setter HTMLScriptElement::event(); 21 | 22 | getter HTMLScriptElement::htmlFor(); 23 | setter HTMLScriptElement::htmlFor(); 24 | 25 | getter HTMLScriptElement::src(); 26 | setter HTMLScriptElement::src(); 27 | 28 | getter HTMLScriptElement::text(); 29 | setter HTMLScriptElement::text(); 30 | 31 | getter HTMLScriptElement::type(); 32 | setter HTMLScriptElement::type(); 33 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLSelectElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML select element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLSelectElement(struct dom_html_element *html_select_element::html_element); 12 | 13 | getter HTMLSelectElement::disabled(); 14 | setter HTMLSelectElement::disabled(); 15 | 16 | getter HTMLSelectElement::multiple(); 17 | setter HTMLSelectElement::multiple(); 18 | 19 | getter HTMLSelectElement::name(); 20 | setter HTMLSelectElement::name(); 21 | 22 | getter HTMLSelectElement::type(); 23 | 24 | getter HTMLSelectElement::value(); 25 | setter HTMLSelectElement::value(); 26 | 27 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLStyleElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML style element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLStyleElement(struct dom_html_element *html_style_element::html_element); 12 | 13 | getter HTMLStyleElement::media(); 14 | setter HTMLStyleElement::media(); 15 | 16 | getter HTMLStyleElement::type(); 17 | setter HTMLStyleElement::type(); 18 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLTableCaptionElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML table caption element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLTableCaptionElement(struct dom_html_element *html_table_caption_element::html_element); 12 | 13 | getter HTMLTableCaptionElement::align(); 14 | setter HTMLTableCaptionElement::align(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLTableColElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML table col element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLTableColElement(struct dom_html_element *html_table_col_element::html_element); 12 | 13 | getter HTMLTableColElement::align(); 14 | setter HTMLTableColElement::align(); 15 | 16 | getter HTMLTableColElement::chOff(); 17 | setter HTMLTableColElement::chOff(); 18 | 19 | getter HTMLTableColElement::ch(); 20 | setter HTMLTableColElement::ch(); 21 | 22 | getter HTMLTableColElement::vAlign(); 23 | setter HTMLTableColElement::vAlign(); 24 | 25 | getter HTMLTableColElement::width(); 26 | setter HTMLTableColElement::width(); 27 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLTableElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML table element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLTableElement(struct dom_html_element *html_table_element::html_element); 12 | 13 | getter HTMLTableElement::align(); 14 | setter HTMLTableElement::align(); 15 | 16 | getter HTMLTableElement::bgColor(); 17 | setter HTMLTableElement::bgColor(); 18 | 19 | getter HTMLTableElement::border(); 20 | setter HTMLTableElement::border(); 21 | 22 | getter HTMLTableElement::cellPadding(); 23 | setter HTMLTableElement::cellPadding(); 24 | 25 | getter HTMLTableElement::cellSpacing(); 26 | setter HTMLTableElement::cellSpacing(); 27 | 28 | getter HTMLTableElement::frame(); 29 | setter HTMLTableElement::frame(); 30 | 31 | getter HTMLTableElement::rules(); 32 | setter HTMLTableElement::rules(); 33 | 34 | getter HTMLTableElement::summary(); 35 | setter HTMLTableElement::summary(); 36 | 37 | getter HTMLTableElement::width(); 38 | setter HTMLTableElement::width(); 39 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLTableRowElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML table row element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLTableRowElement(struct dom_html_element *html_table_row_element::html_element); 12 | 13 | getter HTMLTableRowElement::align(); 14 | setter HTMLTableRowElement::align(); 15 | 16 | getter HTMLTableRowElement::bgColor(); 17 | setter HTMLTableRowElement::bgColor(); 18 | 19 | getter HTMLTableRowElement::chOff(); 20 | setter HTMLTableRowElement::chOff(); 21 | 22 | getter HTMLTableRowElement::ch(); 23 | setter HTMLTableRowElement::ch(); 24 | 25 | getter HTMLTableRowElement::vAlign(); 26 | setter HTMLTableRowElement::vAlign(); 27 | 28 | getter HTMLTableRowElement::rowIndex(); 29 | 30 | getter HTMLTableRowElement::sectionRowIndex(); 31 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLTableSectionElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML table section element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLTableSectionElement(struct dom_html_element *html_table_section_element::html_element); 12 | 13 | getter HTMLTableSectionElement::align(); 14 | setter HTMLTableSectionElement::align(); 15 | 16 | getter HTMLTableSectionElement::chOff(); 17 | setter HTMLTableSectionElement::chOff(); 18 | 19 | getter HTMLTableSectionElement::ch(); 20 | setter HTMLTableSectionElement::ch(); 21 | 22 | getter HTMLTableSectionElement::vAlign(); 23 | setter HTMLTableSectionElement::vAlign(); 24 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLTextAreaElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML text area element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLTextAreaElement(struct dom_html_element *html_text_area_element::html_element); 12 | 13 | getter HTMLTextAreaElement::defaultValue(); 14 | setter HTMLTextAreaElement::defaultValue(); 15 | 16 | getter HTMLTextAreaElement::disabled(); 17 | setter HTMLTextAreaElement::disabled(); 18 | 19 | getter HTMLTextAreaElement::name(); 20 | setter HTMLTextAreaElement::name(); 21 | 22 | getter HTMLTextAreaElement::readOnly(); 23 | setter HTMLTextAreaElement::readOnly(); 24 | 25 | getter HTMLTextAreaElement::type(); 26 | 27 | getter HTMLTextAreaElement::value(); 28 | setter HTMLTextAreaElement::value(); 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/HTMLTitleElement.bnd: -------------------------------------------------------------------------------- 1 | /* HTML title element binding using duktape and libdom 2 | * 3 | * Copyright 2015 Vincent Sanders 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | init HTMLTitleElement(struct dom_html_element *html_title_element::html_element); 12 | 13 | getter HTMLTitleElement::text(); 14 | setter HTMLTitleElement::text(); 15 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/duktape/ImageData.bnd: -------------------------------------------------------------------------------- 1 | /* HTML canvas ImageData objects 2 | * 3 | * Copyright 2020 Daniel Silverstone 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * Released under the terms of the MIT License, 8 | * http://www.opensource.org/licenses/mit-license 9 | */ 10 | 11 | class ImageData { 12 | private int width; 13 | private int height; 14 | private uint8_t *data; 15 | }; 16 | 17 | init ImageData(int width, int height) 18 | %{ 19 | priv->width = width; 20 | priv->height = height; 21 | priv->data = duk_push_buffer(ctx, width * height * 4, false); 22 | duk_put_prop_string(ctx, 0, MAGIC(DATA)); 23 | duk_pop(ctx); 24 | %} 25 | 26 | getter ImageData::width() 27 | %{ 28 | duk_push_int(ctx, priv->width); 29 | return 1; 30 | %} 31 | 32 | getter ImageData::height() 33 | %{ 34 | duk_push_int(ctx, priv->height); 35 | return 1; 36 | %} 37 | 38 | getter ImageData::data() 39 | %{ 40 | duk_push_this(ctx); 41 | duk_get_prop_string(ctx, -1, MAGIC(DATA)); 42 | duk_push_buffer_object(ctx, -1, 0, priv->width * priv->height * 4llu, DUK_BUFOBJ_UINT8CLAMPEDARRAY); 43 | return 1; 44 | %} 45 | -------------------------------------------------------------------------------- /src/content/handlers/javascript/fetcher.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Vincent Sanders 3 | * 4 | * This file is part of NetSurf. 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** \file 20 | * javascript scheme handler 21 | */ 22 | 23 | #ifndef NETSURF_JAVASCRIPT_FETCHER_H 24 | #define NETSURF_JAVASCRIPT_FETCHER_H 25 | 26 | nserror fetch_javascript_register(void); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/content/handlers/text/textplain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2006 James Bursa 3 | * Copyright 2006 Adrian Lees 4 | * 5 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 6 | * 7 | * NetSurf is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; version 2 of the License. 10 | * 11 | * NetSurf is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | /** 21 | * \file 22 | * 23 | * Interface to content handler for plain text. 24 | */ 25 | 26 | #ifndef NETSURF_HTML_TEXTPLAIN_H 27 | #define NETSURF_HTML_TEXTPLAIN_H 28 | 29 | /** 30 | * Initialise the text content handler 31 | * 32 | * \return NSERROR_OK on success else appropriate error code. 33 | */ 34 | nserror textplain_init(void); 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/desktop/theme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Vincent Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** \file 20 | * GUI Themeing interface. 21 | */ 22 | 23 | #ifndef _NETSURF_DESKTOP_THEME_H_ 24 | #define _NETSURF_DESKTOP_THEME_H_ 25 | 26 | /* In platform specific theme_install.c. */ 27 | 28 | void theme_install_start(struct hlcache_handle *c); 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/desktop/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 Vincent Sanders 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | 21 | const int neosurf_version = NEOSURF_VERSION; 22 | -------------------------------------------------------------------------------- /src/docs/updating-duktape.md: -------------------------------------------------------------------------------- 1 | Updating Duktape 2 | ================ 3 | 4 | 1. Fetch the [latest release](http://duktape.org/download.html) archive. 5 | 6 | 2. Extract it somewhere. 7 | 8 | 3. That extracts to a `duktape-[VERSION]` directory. 9 | 10 | 4. We need to tell duktape about our `duk_custom.h` header: 11 | 12 | 1. Change into the `duktape-[VERSION]` directory. 13 | 14 | 2. Run the following command: 15 | 16 | python2 tools/configure.py \ 17 | --output-directory /tmp/output \ 18 | --source-directory src-input \ 19 | --config-metadata config \ 20 | --fixup-line '#include "duk_custom.h"' 21 | 22 | 3. This generates a suitable set of duktape 23 | sources in `/tmp/output` 24 | 25 | 5. Replace the `duktape.c`, `duktape.h` and 26 | `duk_config.h` files in the netsurf source 27 | tree (in `content/handlers/javascript/duktape`) 28 | with those generated in `/tmp/output`. 29 | 30 | -------------------------------------------------------------------------------- /src/docs/user-interface.md: -------------------------------------------------------------------------------- 1 | User Interface 2 | ============== 3 | 4 | [TOC] 5 | 6 | Netsurf is divided into a series of frontends which provide a user 7 | interface around common core functionality. Each frontend is a 8 | distinct implementation for a specific GUI toolkit. 9 | 10 | Because of this the user interface has different features in 11 | each frontend allowing the browser to be a native application. 12 | 13 | # Frontends 14 | 15 | ## gtk 16 | 17 | Frontend that uses the GTK+3 toolkit 18 | 19 | ## visurf 20 | 21 | Frontend that uses the Vi bindings on Wayland 22 | 23 | # User configuration 24 | 25 | The behaviour of the browser can be changed from the defaults with a 26 | configuration file. The [core user options](docs/netsurf-options.md) 27 | of the browser are common to all versions and are augmented by each 28 | frontend in a specific manner. 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/resources/SearchEngines: -------------------------------------------------------------------------------- 1 | DuckDuckGo|www.duckduckgo.com|http://www.duckduckgo.com/html/?q=%s|http://www.duckduckgo.com/favicon.ico|fixme:Their ico upsets the current implementation 2 | wiby|wiby.me|https://wiby.me/?q=%s|https://wiby.me/favicon.ico| 3 | Dictionary.com|dictionary.reference.com|http://dictionary.reference.com/browse/%s?jss=0|http://dictionary.reference.com/favicon.ico| 4 | Wikipedia|en.wikipedia.org|http://en.wikipedia.org/w/index.php?title=Special%%3ASearch&search=%s|http://en.wikipedia.org/favicon.ico| 5 | SearX|searx.neocities.org|https://searx.neocities.org/#q=%s&general_category=on|https://searx.neocities.org/favicon.ico| 6 | -------------------------------------------------------------------------------- /src/resources/credits.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/credits.html -------------------------------------------------------------------------------- /src/resources/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/favicon.png -------------------------------------------------------------------------------- /src/resources/icons/16x16/actions/page-info-insecure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/16x16/actions/page-info-insecure.png -------------------------------------------------------------------------------- /src/resources/icons/16x16/actions/page-info-internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/16x16/actions/page-info-internal.png -------------------------------------------------------------------------------- /src/resources/icons/16x16/actions/page-info-local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/16x16/actions/page-info-local.png -------------------------------------------------------------------------------- /src/resources/icons/16x16/actions/page-info-secure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/16x16/actions/page-info-secure.png -------------------------------------------------------------------------------- /src/resources/icons/16x16/actions/page-info-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/16x16/actions/page-info-warning.png -------------------------------------------------------------------------------- /src/resources/icons/24x24/actions/page-info-insecure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/24x24/actions/page-info-insecure.png -------------------------------------------------------------------------------- /src/resources/icons/24x24/actions/page-info-internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/24x24/actions/page-info-internal.png -------------------------------------------------------------------------------- /src/resources/icons/24x24/actions/page-info-local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/24x24/actions/page-info-local.png -------------------------------------------------------------------------------- /src/resources/icons/24x24/actions/page-info-secure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/24x24/actions/page-info-secure.png -------------------------------------------------------------------------------- /src/resources/icons/24x24/actions/page-info-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/24x24/actions/page-info-warning.png -------------------------------------------------------------------------------- /src/resources/icons/48x48/actions/page-info-insecure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/48x48/actions/page-info-insecure.png -------------------------------------------------------------------------------- /src/resources/icons/48x48/actions/page-info-internal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/48x48/actions/page-info-internal.png -------------------------------------------------------------------------------- /src/resources/icons/48x48/actions/page-info-local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/48x48/actions/page-info-local.png -------------------------------------------------------------------------------- /src/resources/icons/48x48/actions/page-info-secure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/48x48/actions/page-info-secure.png -------------------------------------------------------------------------------- /src/resources/icons/48x48/actions/page-info-warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/48x48/actions/page-info-warning.png -------------------------------------------------------------------------------- /src/resources/icons/arrow-l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/arrow-l.png -------------------------------------------------------------------------------- /src/resources/icons/content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/content.png -------------------------------------------------------------------------------- /src/resources/icons/directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/directory.png -------------------------------------------------------------------------------- /src/resources/icons/directory2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/directory2.png -------------------------------------------------------------------------------- /src/resources/icons/hotlist-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/hotlist-add.png -------------------------------------------------------------------------------- /src/resources/icons/hotlist-rmv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/hotlist-rmv.png -------------------------------------------------------------------------------- /src/resources/icons/local-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/local-history.png -------------------------------------------------------------------------------- /src/resources/icons/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/search.png -------------------------------------------------------------------------------- /src/resources/icons/show-cookie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/icons/show-cookie.png -------------------------------------------------------------------------------- /src/resources/neosurf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CobaltBSD/neosurf/d6c77f22e80b79f80dc9a98a20505823a4ea100c/src/resources/neosurf.png -------------------------------------------------------------------------------- /src/utils/http.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 John-Mark Bell 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | /** \file 20 | * HTTP header parsing functions 21 | */ 22 | 23 | #ifndef NETSURF_UTILS_HTTP_H_ 24 | #define NETSURF_UTILS_HTTP_H_ 25 | 26 | #include 27 | 28 | #include 29 | 30 | #include "utils/http/cache-control.h" 31 | #include "utils/http/content-disposition.h" 32 | #include "utils/http/content-type.h" 33 | #include "utils/http/strict-transport-security.h" 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /src/utils/http/parameter_internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 John-Mark Bell 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_UTILS_HTTP_PARAMETER_INTERNAL_H_ 20 | #define NETSURF_UTILS_HTTP_PARAMETER_INTERNAL_H_ 21 | 22 | #include 23 | #include "utils/http/parameter.h" 24 | 25 | nserror http__parse_parameter(const char **input, http_parameter **parameter); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/utils/http/primitives.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 John-Mark Bell 3 | * 4 | * This file is part of NetSurf, http://www.netsurf-browser.org/ 5 | * 6 | * NetSurf is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; version 2 of the License. 9 | * 10 | * NetSurf is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NETSURF_UTILS_HTTP_PRIMITIVES_H_ 20 | #define NETSURF_UTILS_HTTP_PRIMITIVES_H_ 21 | 22 | #include 23 | 24 | #include 25 | 26 | void http__skip_LWS(const char **input); 27 | 28 | nserror http__parse_token(const char **input, lwc_string **value); 29 | 30 | nserror http__parse_quoted_string(const char **input, lwc_string **value); 31 | 32 | #endif 33 | --------------------------------------------------------------------------------