~ubuntu-branches/ubuntu/trusty/xiphos/trusty

« back to all changes in this revision

Viewing changes to src/xiphos_html/xiphos_html.h

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs, Dmitrijs Ledkovs
  • Date: 2012-03-11 18:43:32 UTC
  • mfrom: (17.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120311184332-splq3ecpx7tyi87d
Tags: 3.1.5+dfsg-1
[ Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> ]  
* New upstream release.
* Build using webkit backend
* Contains unpacked source for waf binary (Closes: #654511)
* Update debian/copyright to latest specification

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Xiphos Bible Study Tool
 
3
 * xiphos_html.h - toolkit-generalized html support
 
4
 *
 
5
 * Copyright (C) 2010-2011 Xiphos Developer Team
 
6
 *
 
7
 * This program 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; either version 2 of the License, or
 
10
 * (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU Library General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License
 
18
 * along with this program; if not, write to the Free Software
 
19
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
20
 */
 
21
 
 
22
#include <config.h>
 
23
 
 
24
/**
 
25
 * A general compatibility layer that will buffer the application from the
 
26
 * direct effects of WebKit and Gecko being alternatively selected for
 
27
 * the rendering system.
 
28
 */   
 
29
#ifndef GTKHTML
 
30
#ifdef USE_WEBKIT
 
31
  #include "../webkit/wk-html.h"
 
32
  #define USE_XIPHOS_HTML
 
33
#else
 
34
  #ifdef USE_GTKMOZEMBED
 
35
    #ifdef WIN32
 
36
      #include "../geckowin/gecko-html.h"
 
37
    #else
 
38
      #include "../gecko/gecko-html.h"
 
39
    #endif
 
40
    #define USE_XIPHOS_HTML
 
41
  #else
 
42
    #ifdef XIPHOS_HTML_EXTERN_C
 
43
      #ifdef __cplusplus
 
44
        extern "C" {
 
45
      #endif
 
46
    #endif
 
47
    #include <gtkhtml/gtkhtml.h>
 
48
    #include "../gui/html.h"
 
49
    #ifdef XIPHOS_HTML_EXTERN_C
 
50
      #ifdef __cplusplus
 
51
        }
 
52
      #endif
 
53
    #endif
 
54
  #endif
 
55
#endif
 
56
 
 
57
// Used in places like the ubiquitous _popmenu_requested_cb
 
58
#ifdef USE_WEBKIT
 
59
        typedef WkHtml XiphosHtml;
 
60
        typedef WkHtmlPriv XiphosHtmlPriv;
 
61
#else
 
62
  #ifdef USE_GTKMOZEMBED
 
63
        typedef GeckoHtml XiphosHtml;
 
64
        typedef GeckoHtmlPriv XiphosHtmlPriv;
 
65
  #endif
 
66
#endif
 
67
 
 
68
// Other layers of compatibility - pulled from display_info.c and other places
 
69
#ifdef USE_WEBKIT
 
70
        #define XIPHOS_HTML WK_HTML
 
71
        #define XIPHOS_HTML_NEW(a, b, c)                xiphos_html_new(a, b, c)
 
72
        #define XIPHOS_HTML_COPY_SELECTION(text_html)   wk_html_copy_selection(WK_HTML(text_html))
 
73
        #define XIPHOS_HTML_OPEN_STREAM(a, b)           wk_html_open_stream(WK_HTML(a), b)
 
74
        #define XIPHOS_HTML_WRITE(a, b, c)              wk_html_write(WK_HTML(a), b, c)
 
75
        #define XIPHOS_HTML_CLOSE(a)                    wk_html_close(WK_HTML(a))
 
76
        #define XIPHOS_HTML_FIND(a, b)                  wk_html_find(a, b)
 
77
        #define XIPHOS_HTML_FIND_AGAIN(a, b)            wk_html_find_again(a, b)
 
78
        #define XIPHOS_HTML_JUMP_TO_ANCHOR              wk_html_jump_to_anchor
 
79
        #define XIPHOS_HTML_PRINT_DOCUMENT(a)           wk_html_print(a)// TODO: Implement?
 
80
        #define XIPHOS_HTML_SHUTDOWN                    wk_html_shutdown
 
81
        #define XIPHOS_HTML_INITIALIZE                  wk_html_initialize
 
82
        
 
83
        #define XIPHOS_TYPE_HTML WK_TYPE_HTML
 
84
        #define XIPHOS_HTML_GET_PRIVATE(object)         (G_TYPE_INSTANCE_GET_PRIVATE ((object), WK_TYPE_HTML, WkHtmlPriv))
 
85
#else
 
86
  #ifdef USE_GTKMOZEMBED
 
87
        #define XIPHOS_HTML GECKO_HTML
 
88
        #define XIPHOS_HTML_NEW(a, b, c)                xiphos_html_new(a, b, c)
 
89
        #define XIPHOS_HTML_COPY_SELECTION(text_html)   gecko_html_copy_selection(GECKO_HTML(text_html))
 
90
        #define XIPHOS_HTML_OPEN_STREAM(a, b)           gecko_html_open_stream(GECKO_HTML(a), b)
 
91
        #define XIPHOS_HTML_WRITE(a, b, c)              gecko_html_write(GECKO_HTML(a), b, c)
 
92
        #define XIPHOS_HTML_CLOSE(a)                    gecko_html_close(GECKO_HTML(a))
 
93
        #define XIPHOS_HTML_FIND(a, b)                  gecko_html_find(a, b)
 
94
        #define XIPHOS_HTML_FIND_AGAIN(a, b)            gecko_html_find_again(a, b)
 
95
        #define XIPHOS_HTML_JUMP_TO_ANCHOR              gecko_html_jump_to_anchor
 
96
        #define XIPHOS_HTML_PRINT_DOCUMENT(a, b, c)     gecko_html_print_document(a, b, c)
 
97
        #define XIPHOS_HTML_SHUTDOWN                    gecko_html_shutdown
 
98
        #define XIPHOS_HTML_INITIALIZE                  gecko_html_initialize
 
99
        
 
100
        #define XIPHOS_TYPE_HTML GECKO_TYPE_HTML
 
101
        #define XIPHOS_HTML_GET_PRIVATE(object)         (G_TYPE_INSTANCE_GET_PRIVATE ((object), GECKO_TYPE_HTML, GeckoHtmlPriv)) 
 
102
  #endif
 
103
#endif
 
104
 
 
105
XiphosHtml *xiphos_html_new(DIALOG_DATA * dialog, gboolean is_dialog, gint pane);
 
106
   
 
107
#endif /* !GTKHTML */