Commit Graph

150 Commits

Author SHA1 Message Date
Vincent Sanders
a8a6098f68 move core window API into netsurf header path 2016-08-18 21:07:04 +01:00
Michael Drake
9aecf47408 Treeview: Rationalise initialisation and finalisation.
Previously the expected behaviour for front ends using the correct
API for hotlist, global history, cookie manager, and ssl cert
viewer was that the front end would initialise the treeview module
on startup and finalise it on application exit.

However, this meant that the front ends had to include the core
treeview header, which they didn't otherwise need.

Since the tree module provided access to the new treeview utilities
through the old tree API, and was used by front ends with no changes
for the new treeview API, the tree layer refcounted initialisations
of treeview-based widgets, and only called the underlying treeview
init/fini functions when needed.

This change moves that refcounting into the treeview module.  Now
the hotlist, global history, cookie manager, and ssl cert viewer
widgets call call treeview init/fini as part of their own
initialisation and finalisation.  This means that front ends
using the correct APIs for treeview-based widgets don't need to
know anything about the underlying treeview, and the tree module
compatibility layer has had its treeview refcounting removed.

Finally, the treeview_init function took a font size parameter.
Now it does not and lit gets font size from config.  We probably
want to add a new `treeview_font_size` option to nsoptions, and
have differnent defaults on different platforms. 12pt on RISC OS,
and 11pt elsewhere, most likely.
2016-08-10 18:57:36 +01:00
Vincent Sanders
0ae788752c remove unecessary textinput header use from treeview header 2016-06-30 16:12:06 +01:00
Vincent Sanders
7fc0a4c481 move desktop window header into public API 2016-05-30 17:32:57 +01:00
Vincent Sanders
fe7eb85614 move misc header into public API 2016-05-30 11:23:32 +01:00
Vincent Sanders
6722943b81 move the CSS content handler 2016-05-26 11:18:41 +01:00
Vincent Sanders
6a36d4ec2b remove all core usage of warn_user API 2016-04-26 12:50:16 +01:00
Vincent Sanders
c105738fa3 Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all
callsites to have double bracketing and allows for future improvement
on how we use the logging macros.

The callsites were changed with coccinelle and the changes checked by
hand. Compile tested for several frontends but not all.

A formatting annotation has also been added which allows the compiler
to check the parameters and types passed to the logging.
2015-05-28 16:08:46 +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
25c4ea7a6e stop treeview redraw failing because of bad global state. 2014-07-21 11:54:21 +01:00
Vincent Sanders
db01637343 remove content include from urldb header 2014-07-17 00:18:44 +01:00
Vincent Sanders
2326d3c503 remove unecessary utils/url.h includes 2014-05-09 10:15:42 +01:00
Michael Drake
69da9a55e1 Assert a bit earlier when front end tries to redraw SSL cert viewer that it's destroyed. 2014-01-06 13:41:11 +00:00
Michael Drake
3d123d72fc Enable front end to select treeview text size. 2013-09-09 13:11:36 +01:00
Michael Drake
267c630b88 Tidy up compatibility layer. 2013-09-04 15:13:53 +01:00
Michael Drake
472108576e Make it more clear that tree.c is deprecated. 2013-09-02 22:58:18 +01:00
Michael Drake
49c7994d05 Remove bulk of old treeview implementation. 2013-09-02 16:19:16 +01:00
Michael Drake
fadaa306d0 Always redirect to the new treeview implementations. 2013-09-02 12:46:33 +01:00
Michael Drake
e2fbd3a266 Avoid copying rectangle for redraw_request calls. 2013-08-30 11:38:02 +01:00
Michael Drake
eaa04e3208 Fix pass-through for drag end. 2013-08-28 15:37:41 +01:00
Michael Drake
1e27299cf1 Inform when textarea drag is happening. 2013-08-21 13:54:00 +01:00
Michael Drake
5beac3085e Implement get window dimensions for treeview test parasite. 2013-08-19 14:04:20 +01:00
Michael Drake
0ae3bfde8a Use extern on tree.c globals. (These go away when front ends can use the new treeview modules directly.) 2013-08-18 17:17:41 +01:00
Michael Drake
7169b2fb01 Make treeview test parasite convert move drag enum type. 2013-08-16 20:03:18 +01:00
Michael Drake
8b83456c02 Beginnings of new hotlist module, implemented with new treeview.
Currently it can only open, display and launch entries in an existing hotlist file.

TODO:
  - Generate defualt hotlist when file not found.
  - Add hotlist saving.
  - Allow adding to hotlist.
  - Allow hotlist editing.
  - Allow hotlist nodes to be moved by dragging.
  - Allow hotlist visit data to be updated.
2013-08-16 08:25:25 +01:00
Michael Drake
298ac7c329 Use the new ssl certificate viewer in all situations. 2013-08-13 14:09:15 +01:00
Michael Drake
da84e1a00a Add SSL cert handling to treeview test hack. 2013-08-12 10:32:54 +01:00
Michael Drake
2bd587add5 Make the parasitic hack of the old tree code more robust. Now if the temp_treeview_test option is set, the global history and cookie manager will be replaced with their respective new implementations. 2013-07-26 14:48:26 +01:00
Michael Drake
bc37046c6c Pass drag state to core window user. 2013-07-01 15:10:45 +01:00
Michael Drake
6e5e741d53 Add temporary option to enable test of new treeview in bookmarks window. 2013-07-01 14:07:25 +01:00
Michael Drake
c862cd60ad Make treeview test parasite trap keyboard action too. 2013-07-01 11:49:14 +01:00
Michael Drake
a1f5272f78 Update treeview test parasite to pass tree height changes on to front end. 2013-06-30 17:54:08 +01:00
Michael Drake
146fea758f Global history finaliser does not need core_window stuff. 2013-06-18 17:25:23 +01:00
Michael Drake
a3c72894b9 Make test parasite pass drag end event to new treeview. 2013-06-15 15:50:41 +01:00
Michael Drake
aeb09c7329 Remove logging. 2013-06-03 20:10:19 +01:00
Michael Drake
8fda149bae Make heights signed, to simplify comparison with struct rect values, which are signed. 2013-06-03 19:49:36 +01:00
Michael Drake
b959e6946d Squash warning. 2013-05-31 21:02:56 +01:00
Michael Drake
e684218169 Merge branch 'master' of git://git.netsurf-browser.org/netsurf 2013-05-31 20:58:39 +01:00
Chris Young
864762cbe6 Merge branch 'chris/gadtools-53-5' 2013-05-31 19:59:58 +01:00
Michael Drake
03eb4ec30f Implement redraw request hander for treeview test parsite. 2013-05-31 17:57:28 +01:00
Michael Drake
a669a7d12c Make treeview test parasite sit on mouse input too. 2013-05-31 13:26:14 +01:00
Michael Drake
d939460872 Add parasitic hack to allow the new treeview to be tested in the Hotlist window.
(Tested with GTK front end only, so far.)
2013-05-31 10:11:22 +01:00
Vincent Sanders
ee6e6eec05 move options include 2013-05-28 14:16:10 +01:00
Chris Young
034ba7c2f2 Allow getting the node's icon 2013-05-18 16:35:48 +01:00
Vincent Sanders
52c5cccdeb cleanup tree_create_leaf_node text ownership 2013-05-04 09:49:11 +01:00
Vincent Sanders
5c57a30047 cleanup title string ownership madness in the tree_create_folder_node() API 2013-05-03 21:17:11 +01:00
Michael Drake
0d831c4ab6 Scaled textarea rendering support. Ugly. 2013-02-08 23:25:40 +00:00
Michael Drake
442218cb80 Pull flags out of textarea_setup. 2013-02-02 22:58:35 +00:00
Michael Drake
663191791e Add move caret msg. Add flag to choose internal caret or caret move msgs. 2013-01-30 18:01:01 +00:00
Michael Drake
93cc123200 Update textarea to inform client what it's doing with drags.
Now single callback for both redraw requests and drag reports.
Update treeview to use new textarea API.
Update Atari URL bar to use new textarea API.  (Ignores drag reports, currently.)
Minor textarea fixes.
2013-01-29 17:34:08 +00:00