]> git.decadent.org.uk Git - videolink.git/blob - style_sheets.hpp
Changed style-sheet application in Mozila/XULRunner 1.8 to override built-in preferen...
[videolink.git] / style_sheets.hpp
1 // Copyright 2005 Ben Hutchings <ben@decadent.org.uk>.
2 // See the file "COPYING" for licence details.
3
4 #ifndef INC_STYLESHEETS_HPP
5 #define INC_STYLESHEETS_HPP
6
7 #include <nsCOMPtr.h>
8 #include <nsIStyleSheet.h>
9
10 class nsIPresShell;
11
12 // These functions load and apply a style-sheet as necessary,
13 // overriding the built-in "preferences".
14
15 // init_agent_style_sheet() must be called once during startup
16 // apply_agent_style_sheet() must be called for each page
17
18 #if MOZ_VERSION_MAJOR > 1 || (MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR >= 8)
19
20 struct agent_style_sheet_holder {};
21
22 // Load agent style sheet from an (absolute) URI, and register it if
23 // possible.
24 agent_style_sheet_holder init_agent_style_sheet(const char * uri);
25 inline void apply_agent_style_sheet(agent_style_sheet_holder, nsIPresShell *)
26 {}
27
28 #else
29
30 typedef nsCOMPtr<nsIStyleSheet> agent_style_sheet_holder;
31 already_AddRefed<nsIStyleSheet> init_agent_style_sheet(const char * uri);
32 void apply_agent_style_sheet(nsIStyleSheet *, nsIPresShell *);
33
34 #endif
35
36
37 #endif // !INC_STYLESHEETS_HPP