Commit Graph

370 Commits

Author SHA1 Message Date
Witold Filipczyk befa5e6ed3 To avoid namespace conflicts with ncurses add NetSurf key prefix.
Adds a NetSurf key code prefix of NS_ to all key codes.
2015-03-27 09:36:19 +00:00
Vincent Sanders 8a99b045bc Remove url from content thumbnailers API
The content thumbnailers for each frontend were being provided the
contents url. This was only ever used to call the urldb thumbnail
setting API.

This changes it so the single callsite that passed a valid url adds
the bitmap to that url itself in desktop_history.c instead of forcing
every frontend to require the urldb API.

Additionally the old API could pass the url as NULL which was causing
asserts where this was not an expected parameter value. Because of
this this fixes bug #2286 which was also present in the monkey
frontend as both called nsurl_access() on the url without the NULL
check and caused an assertion.
2015-03-15 00:00:45 +00:00
Vincent Sanders 9fb0eaa1cd fix missing semicolon 2014-11-21 13:14:20 +00:00
Michael Drake 19af487fa1 Shouldn't need browser_private.h now. 2014-11-21 12:56:19 +00:00
Michael Drake 47f6e29b4c Use browser_window_stop_available()
Looking at bw->loading_content was bad and wrong in the cases
of frames, and object fetches.
2014-11-21 12:53:55 +00:00
Michael Drake 6ea2fd3a7f Use API to get content for view source. 2014-11-21 12:51:30 +00:00
Michael Drake 22ebdd3315 Use API to get current scale. 2014-11-21 12:50:02 +00:00
Vincent Sanders 3ff4846c1a Remove usage of browser private interfaces
The cocoa frontend was directly acessing browser internals instead of
using the API. In the case of gui.m there was a check for the browser
window not being root (browser->parent != NULL) . As gui windows can
only ever be associated with the root brower window (i.e. its parent
will always be NULL) this was completely redundant.
2014-11-21 11:48:43 +00:00
Vincent Sanders a50d2035a7 Fix cocoa usage of render internals 2014-11-13 22:15:32 +00:00
Vincent Sanders 79e501075a make the form select menu API smaller.
By hiding all but the form selection menu option structure from code
outside of render this reduces the API to the absolute minimum to
support this feature.
2014-11-13 21:52:08 +00:00
Vincent Sanders c14ddad660 change url setting api to take an nsurl instead of a text string 2014-11-02 22:30:45 +00:00
Vincent Sanders 03abea12a7 fix errors introuced with previous header cleanup. 2014-11-02 20:39:15 +00:00
Vincent Sanders f2cda2e1a7 fix typo in cocoa frontend context cleanup 2014-11-02 16:03:37 +00:00
Vincent Sanders c31c4babe1 Change contextual content retrieval to browser features.
Update the API which allows frontends to acquire the page features
(images, link urls or form elements) present at the given coordinates
within a browser window.

By making this an explicit browser_window API and using the browser.h
header for the associated data structure with a more appropriate API
naming the usage is much more obvious and contained.

Additionally the link url is now passed around as a nsurl stopping it
being converted from nsurl to text and back again several times.
2014-11-02 15:46:42 +00:00
Vincent Sanders 7ace528729 Update url setting API to return nserror code instead of calling warn_user 2014-10-29 00:18:12 +00:00
Vincent Sanders d204d6d555 Clean up saving as PDF
This removes the global PDF_Password interface that had completely
bitrotted and moves it into the standard misc operation table with a
sensible defualt implementation.

This also cleans up and fixes the gtk frontend implementation of the
pdf password callback so it compiles.

Finally this moves the implementation to a sensible place alongside
the other exporters reducing target makefile complexity futher.
2014-10-26 23:53:14 +00:00
Vincent Sanders 14e2829489 remove the die API from the core.
The die() API for abnormal termination does not belong within the core
of netsurf and instead errors are propogated back to the callers.

This is the final part of this change and the API is now only used within
some parts of the frontends
2014-10-26 12:42:53 +00:00
Michael Drake f1066f3a56 Doesn't look bw internals are used here. 2014-10-24 21:18:02 +01:00
Michael Drake 94f32b8369 Move create_form_select_menu to window gui table. 2014-10-24 20:45:21 +01:00
Vincent Sanders 686fd09ad8 fix cocoa browser private dereferences 2014-10-19 01:54:16 +01:00
Vincent Sanders 6b36990787 improve cocoa frontend to use proper API for browser_window access 2014-10-19 01:38:05 +01:00
Vincent Sanders 73eb9f49b5 update cocoa frontend to cope with split operation tables 2014-10-16 23:25:28 +01:00
Michael Drake 8ac1a88589 Cocoa front end calls bw browser. 2014-10-16 14:51:24 +01:00
Michael Drake a4554d93bc Attempt Objective-C fix. 2014-10-16 14:45:26 +01:00
Michael Drake 63645c4c32 Fix core create_form_select_menu API to pass gw, rather than bw out to front ends. 2014-10-16 12:39:31 +01:00
Vincent Sanders 30f118a86d remove unecessary css includes from fronetends 2014-10-13 15:45:51 +01:00
Vincent Sanders 02bbaa3e88 split version info into its own header and remove unnecessary nesurf.h includes
The netsurf.h header should *only* contain the registration, core
initialisation and finalisation methods. Version information is best
placed in its own header.

Also remove any unneeded inclusion of this header limiting it to
solely the places the relevant API is required.
2014-10-13 15:08:16 +01:00
Vincent Sanders 17be8cf216 Put the font operations table alongside all the other core API
The netsurf core is driven from numerous operation tables most of
which are now set through a common netsurf_register() interface. The
font and plotting interfaces are currently separate and unlike all the
other operation tables are modified for differing contexts.

This change moves the font operations alongside all the other
operations table and remove unnecessary interaction with the renderers
font internals. Further this also removes the need for css internals
to be visible in frontends.
2014-10-13 11:56:31 +01:00
Vincent Sanders 3fa0ed01c0 add API to set DPI 2014-10-13 02:34:10 +01:00
Vincent Sanders a726860d4e remove use of deprecated netsurf_quit variable in cocoa
The core no longer needs to run the event polling loop as fetches are now
scheduler driven. This is part of a series which will ultimately remove
netsurf_poll callback altogether.
2014-10-12 23:35:09 +01:00
Vincent Sanders bfd16c30fa update default mac os X version in the correct place 2014-10-03 15:35:16 +01:00
Vincent Sanders 57f8cf6433 As we no longer build the PPC version the default SDK version should be 10.6 for snow leopard compatability 2014-10-03 15:15:55 +01:00
Vincent Sanders 4f530a3f8f Pull warning flags out into variables that can be overriden seperately for C and C++ 2014-09-05 16:01:44 +01:00
Vincent Sanders 07f1ae7461 fixup missing includes 2014-07-06 19:36:12 +01:00
Vincent Sanders caf918d2f2 fixup merge of scheduled reformat 2014-07-06 11:01:39 +01:00
Vincent Sanders 18aefabd20 change reformat to be driven from the scheduler like redraw 2014-07-01 09:27:20 +01:00
Vincent Sanders 8944edd649 convert all frontends to scheduled fetch operation 2014-06-26 19:05:59 +01:00
Vincent Sanders 7d02ae916a make launch_url core operation use nsurl 2014-05-27 23:52:35 +01:00
Vincent Sanders 00b6cfc57e rework path to url mapping functions to convert from and to nsurl 2014-05-26 23:52:36 +01:00
Vincent Sanders 64f607760b add backing store storage path to browser initialisation 2014-05-13 15:53:06 +01:00
Vincent Sanders 16b11e7238 ensure operations tables are registered as early as possible. 2014-05-10 10:22:10 +01:00
Vincent Sanders 2326d3c503 remove unecessary utils/url.h includes 2014-05-09 10:15:42 +01:00
Vincent Sanders cd7f1eceea make download_context_get_url() return an nsurl and adapt callers to cope 2014-05-08 17:54:44 +01:00
Vincent Sanders c56642819e add file operations table and make all frontends use it.
This rationalises the path construction and basename file
operations. The default implementation is POSIX which works for all
frontends except windows, riscos and amiga which have differeing path
separators and rules.

These implementations are significantly more robust than the previous
nine implementations and also do not use unsafe strncpy or buffers
with arbitrary length limits.

These implementations also carry full documentation comments.
2014-05-07 16:24:51 +01:00
Vincent Sanders 56b42943d0 improve iconv library handling 2014-04-30 11:56:57 +01:00
Vincent Sanders 6f9a93e332 fix formatting of defaults makefiles 2014-03-20 11:05:39 +00:00
Vincent Sanders c86d1cfba6 add missing include to cocoa search 2014-03-18 23:27:26 +00:00
Vincent Sanders 4d4d74c8cd move page search gui callbacks to their own operations table 2014-03-18 22:32:52 +00:00
Vincent Sanders 5c6a0eda3b fixup missing includes from schedule changes 2014-03-09 16:14:05 +00:00
Vincent Sanders 87f6314dab move scheduleing into browser operation table 2014-03-09 15:37:40 +00:00