Enable gtktiledviewer on Windows
A new configure argument is introduced: --with-gtk3-build=<absolute path to GTK3 build> When provided, libreofficekit_selectionhandles package, libreofficekitgtk library and gtktiledviewer executable would be built on Windows using the GTK3 libraries in the passed directory, that must contain lib/pkgconfig subdirectory with correct pkg-config data. Change-Id: I6504af6eec0fc73cceb26a1ce923337abe14b5c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141624 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -82,6 +82,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
|
|||||||
visualbackendtest \
|
visualbackendtest \
|
||||||
listfonts \
|
listfonts \
|
||||||
$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), gtktiledviewer) \
|
$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), gtktiledviewer) \
|
||||||
|
$(if $(and $(ENABLE_GTKTILEDVIEWER), $(filter WNT,$(OS))), gtktiledviewer) \
|
||||||
$(if $(filter EMSCRIPTEN,$(OS)),wasm-qt5-mandelbrot) \
|
$(if $(filter EMSCRIPTEN,$(OS)),wasm-qt5-mandelbrot) \
|
||||||
))
|
))
|
||||||
|
|
||||||
@@ -655,6 +656,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
|
|||||||
$(if $(ENABLE_JAVA),hsqldb) \
|
$(if $(ENABLE_JAVA),hsqldb) \
|
||||||
i18nutil \
|
i18nutil \
|
||||||
$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), libreofficekitgtk) \
|
$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), libreofficekitgtk) \
|
||||||
|
$(if $(and $(ENABLE_GTKTILEDVIEWER), $(filter WNT,$(OS))), libreofficekitgtk) \
|
||||||
$(if $(ENABLE_JAVA), \
|
$(if $(ENABLE_JAVA), \
|
||||||
$(if $(filter $(OS),MACOSX),,officebean) \
|
$(if $(filter $(OS),MACOSX),,officebean) \
|
||||||
) \
|
) \
|
||||||
@@ -872,6 +874,7 @@ $(eval $(call gb_Helper_register_packages_for_install,calc,\
|
|||||||
|
|
||||||
$(eval $(call gb_Helper_register_packages_for_install,libreofficekit,\
|
$(eval $(call gb_Helper_register_packages_for_install,libreofficekit,\
|
||||||
$(if $(filter LINUX %BSD SOLARIS, $(OS)),libreofficekit_selectionhandles) \
|
$(if $(filter LINUX %BSD SOLARIS, $(OS)),libreofficekit_selectionhandles) \
|
||||||
|
$(if $(and $(ENABLE_GTKTILEDVIEWER), $(filter WNT,$(OS))), libreofficekit_selectionhandles) \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_Helper_register_packages_for_install,ure,\
|
$(eval $(call gb_Helper_register_packages_for_install,ure,\
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ export ENABLE_GPGMEPP=@ENABLE_GPGMEPP@
|
|||||||
export ENABLE_GSTREAMER_1_0=@ENABLE_GSTREAMER_1_0@
|
export ENABLE_GSTREAMER_1_0=@ENABLE_GSTREAMER_1_0@
|
||||||
export ENABLE_GTK3=@ENABLE_GTK3@
|
export ENABLE_GTK3=@ENABLE_GTK3@
|
||||||
export ENABLE_GTK4=@ENABLE_GTK4@
|
export ENABLE_GTK4=@ENABLE_GTK4@
|
||||||
|
export ENABLE_GTKTILEDVIEWER=@ENABLE_GTKTILEDVIEWER@
|
||||||
export DISABLE_GUI=@DISABLE_GUI@
|
export DISABLE_GUI=@DISABLE_GUI@
|
||||||
export ENABLE_HEADLESS=@ENABLE_HEADLESS@
|
export ENABLE_HEADLESS=@ENABLE_HEADLESS@
|
||||||
export ENABLE_HTMLHELP=@ENABLE_HTMLHELP@
|
export ENABLE_HTMLHELP=@ENABLE_HTMLHELP@
|
||||||
|
|||||||
+44
-12
@@ -46,19 +46,31 @@ FilterLibs()
|
|||||||
# Return value: $filteredlibs
|
# Return value: $filteredlibs
|
||||||
|
|
||||||
filteredlibs=
|
filteredlibs=
|
||||||
for f in $1; do
|
if test "$COM" = "MSC"; then
|
||||||
case "$f" in
|
for f in $1; do
|
||||||
# let's start with Fedora's paths for now
|
if test "x$f" != "x${f#-L}"; then
|
||||||
-L/lib|-L/lib/|-L/lib64|-L/lib64/|-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/)
|
filteredlibs="$filteredlibs -LIBPATH:${f:2}"
|
||||||
# ignore it: on UNIXoids it is searched by default anyway
|
elif test "x$f" != "x${f#-l}"; then
|
||||||
# but if it's given explicitly then it may override other paths
|
filteredlibs="$filteredlibs ${f:2}.lib"
|
||||||
# (on macOS it would be an error to use it instead of SDK)
|
else
|
||||||
;;
|
|
||||||
*)
|
|
||||||
filteredlibs="$filteredlibs $f"
|
filteredlibs="$filteredlibs $f"
|
||||||
;;
|
fi
|
||||||
esac
|
done
|
||||||
done
|
else
|
||||||
|
for f in $1; do
|
||||||
|
case "$f" in
|
||||||
|
# let's start with Fedora's paths for now
|
||||||
|
-L/lib|-L/lib/|-L/lib64|-L/lib64/|-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/)
|
||||||
|
# ignore it: on UNIXoids it is searched by default anyway
|
||||||
|
# but if it's given explicitly then it may override other paths
|
||||||
|
# (on macOS it would be an error to use it instead of SDK)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
filteredlibs="$filteredlibs $f"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
PathFormat()
|
PathFormat()
|
||||||
@@ -2681,6 +2693,11 @@ libo_FUZZ_ARG_WITH(latest-c++,
|
|||||||
published standard.]),,
|
published standard.]),,
|
||||||
[with_latest_c__=no])
|
[with_latest_c__=no])
|
||||||
|
|
||||||
|
AC_ARG_WITH(gtk3-build,
|
||||||
|
AS_HELP_STRING([--with-gtk3-build=<absolute path to GTK3 build>],
|
||||||
|
[(Windows-only) In order to build GtkTiledViewer on Windows, pass the path
|
||||||
|
to a GTK3 build, like '--with-gtk3-build=C:/gtk-build/gtk/x64/release'.]))
|
||||||
|
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
dnl Branding
|
dnl Branding
|
||||||
dnl ===================================================================
|
dnl ===================================================================
|
||||||
@@ -11748,6 +11765,7 @@ dnl ===================================================================
|
|||||||
|
|
||||||
GTK3_CFLAGS=""
|
GTK3_CFLAGS=""
|
||||||
GTK3_LIBS=""
|
GTK3_LIBS=""
|
||||||
|
ENABLE_GTKTILEDVIEWER=""
|
||||||
if test "$test_gtk3" = yes -a "x$enable_gtk3" = "xyes" -o "x$enable_gtk3_kde5" = "xyes"; then
|
if test "$test_gtk3" = yes -a "x$enable_gtk3" = "xyes" -o "x$enable_gtk3_kde5" = "xyes"; then
|
||||||
if test "$with_system_cairo" = no; then
|
if test "$with_system_cairo" = no; then
|
||||||
add_warning 'Non-system cairo combined with gtk3 is assumed to cause trouble; proceed at your own risk.'
|
add_warning 'Non-system cairo combined with gtk3 is assumed to cause trouble; proceed at your own risk.'
|
||||||
@@ -11765,9 +11783,23 @@ if test "$test_gtk3" = yes -a "x$enable_gtk3" = "xyes" -o "x$enable_gtk3_kde5" =
|
|||||||
AC_CHECK_HEADER(EGL/eglplatform.h, [],
|
AC_CHECK_HEADER(EGL/eglplatform.h, [],
|
||||||
[AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], [])
|
[AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], [])
|
||||||
fi
|
fi
|
||||||
|
elif test -n "$with_gtk3_build" -a "$OS" = "WNT"; then
|
||||||
|
PathFormat "${with_gtk3_build}/lib/pkgconfig"
|
||||||
|
if test "$build_os" = "cygwin"; then
|
||||||
|
dnl cygwin's pkg-config does not recognize "C:/..."-style paths, only "/cygdrive/c/..."
|
||||||
|
formatted_path_unix=`cygpath -au "$formatted_path_unix"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
PKG_CONFIG_PATH="$formatted_path_unix"; export PKG_CONFIG_PATH
|
||||||
|
PKG_CHECK_MODULES(GTK3, cairo gdk-3.0 gio-2.0 glib-2.0 gobject-2.0 gtk+-3.0)
|
||||||
|
GTK3_CFLAGS="$GTK3_CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
|
||||||
|
FilterLibs "${GTK3_LIBS}"
|
||||||
|
GTK3_LIBS="${filteredlibs}"
|
||||||
|
ENABLE_GTKTILEDVIEWER="yes"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(GTK3_LIBS)
|
AC_SUBST(GTK3_LIBS)
|
||||||
AC_SUBST(GTK3_CFLAGS)
|
AC_SUBST(GTK3_CFLAGS)
|
||||||
|
AC_SUBST(ENABLE_GTKTILEDVIEWER)
|
||||||
|
|
||||||
GTK4_CFLAGS=""
|
GTK4_CFLAGS=""
|
||||||
GTK4_LIBS=""
|
GTK4_LIBS=""
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
#include <LibreOfficeKit/LibreOfficeKit.h>
|
#include <LibreOfficeKit/LibreOfficeKit.h>
|
||||||
|
|
||||||
|
// Avoid "error C2375: 'foo': redefinition; different linkage" on MSVC
|
||||||
|
#if defined LOK_DOC_VIEW_IMPLEMENTATION
|
||||||
|
#define LOK_DOC_VIEW_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
|
||||||
|
#else
|
||||||
|
#define LOK_DOC_VIEW_DLLPUBLIC
|
||||||
|
#endif
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define LOK_TYPE_DOC_VIEW (lok_doc_view_get_type())
|
#define LOK_TYPE_DOC_VIEW (lok_doc_view_get_type())
|
||||||
@@ -38,7 +45,7 @@ struct _LOKDocViewClass
|
|||||||
GtkDrawingAreaClass parent_class;
|
GtkDrawingAreaClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType lok_doc_view_get_type (void) G_GNUC_CONST;
|
LOK_DOC_VIEW_DLLPUBLIC GType lok_doc_view_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_new:
|
* lok_doc_view_new:
|
||||||
@@ -50,7 +57,7 @@ GType lok_doc_view_get_type (void) G_GNUC
|
|||||||
*
|
*
|
||||||
* Returns: (transfer none): The #LOKDocView widget instance.
|
* Returns: (transfer none): The #LOKDocView widget instance.
|
||||||
*/
|
*/
|
||||||
GtkWidget* lok_doc_view_new (const gchar* pPath,
|
LOK_DOC_VIEW_DLLPUBLIC GtkWidget* lok_doc_view_new (const gchar* pPath,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
@@ -67,7 +74,7 @@ GtkWidget* lok_doc_view_new (const gchar*
|
|||||||
*
|
*
|
||||||
* Returns: (transfer none): The #LOKDocView widget instance.
|
* Returns: (transfer none): The #LOKDocView widget instance.
|
||||||
*/
|
*/
|
||||||
GtkWidget* lok_doc_view_new_from_user_profile (const gchar* pPath,
|
LOK_DOC_VIEW_DLLPUBLIC GtkWidget* lok_doc_view_new_from_user_profile (const gchar* pPath,
|
||||||
const gchar* pUserProfile,
|
const gchar* pUserProfile,
|
||||||
GCancellable *cancellable,
|
GCancellable *cancellable,
|
||||||
GError **error);
|
GError **error);
|
||||||
@@ -79,7 +86,7 @@ GtkWidget* lok_doc_view_new_from_user_profile (const gchar*
|
|||||||
*
|
*
|
||||||
* Returns: (transfer none): The #LOKDocView widget instance.
|
* Returns: (transfer none): The #LOKDocView widget instance.
|
||||||
*/
|
*/
|
||||||
GtkWidget* lok_doc_view_new_from_widget (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC GtkWidget* lok_doc_view_new_from_widget (LOKDocView* pDocView,
|
||||||
const gchar* pRenderingArguments);
|
const gchar* pRenderingArguments);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -91,7 +98,7 @@ GtkWidget* lok_doc_view_new_from_widget (LOKDocView*
|
|||||||
* @callback:
|
* @callback:
|
||||||
* @userdata:
|
* @userdata:
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_open_document (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_open_document (LOKDocView* pDocView,
|
||||||
const gchar* pPath,
|
const gchar* pPath,
|
||||||
const gchar* pRenderingArguments,
|
const gchar* pRenderingArguments,
|
||||||
GCancellable* cancellable,
|
GCancellable* cancellable,
|
||||||
@@ -106,7 +113,7 @@ void lok_doc_view_open_document (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if the document is loaded successfully, %FALSE otherwise
|
* Returns: %TRUE if the document is loaded successfully, %FALSE otherwise
|
||||||
*/
|
*/
|
||||||
gboolean lok_doc_view_open_document_finish (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC gboolean lok_doc_view_open_document_finish (LOKDocView* pDocView,
|
||||||
GAsyncResult* res,
|
GAsyncResult* res,
|
||||||
GError** error);
|
GError** error);
|
||||||
|
|
||||||
@@ -118,7 +125,7 @@ gboolean lok_doc_view_open_document_finish (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: The #LibreOfficeKitDocument instance the widget is currently showing
|
* Returns: The #LibreOfficeKitDocument instance the widget is currently showing
|
||||||
*/
|
*/
|
||||||
LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView* pDocView);
|
LOK_DOC_VIEW_DLLPUBLIC LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView* pDocView);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_set_zoom:
|
* lok_doc_view_set_zoom:
|
||||||
@@ -129,7 +136,7 @@ LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView*
|
|||||||
* existing zoom level. Values outside the range [0.25, 5.0] are clamped into
|
* existing zoom level. Values outside the range [0.25, 5.0] are clamped into
|
||||||
* the nearest allowed value in the interval.
|
* the nearest allowed value in the interval.
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_set_zoom (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_set_zoom (LOKDocView* pDocView,
|
||||||
float fZoom);
|
float fZoom);
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_set_visible_area:
|
* lok_doc_view_set_visible_area:
|
||||||
@@ -140,7 +147,7 @@ void lok_doc_view_set_zoom (LOKDocView*
|
|||||||
* to jump the correct length, which depends on the amount of visible height of
|
* to jump the correct length, which depends on the amount of visible height of
|
||||||
* the document.
|
* the document.
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_set_visible_area (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_set_visible_area (LOKDocView* pDocView,
|
||||||
GdkRectangle* pVisibleArea);
|
GdkRectangle* pVisibleArea);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -149,7 +156,7 @@ void lok_doc_view_set_visible_area (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: The current zoom factor value in float for pDocView
|
* Returns: The current zoom factor value in float for pDocView
|
||||||
*/
|
*/
|
||||||
gfloat lok_doc_view_get_zoom (LOKDocView* pDocView);
|
LOK_DOC_VIEW_DLLPUBLIC gfloat lok_doc_view_get_zoom (LOKDocView* pDocView);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_get_parts:
|
* lok_doc_view_get_parts:
|
||||||
@@ -158,7 +165,7 @@ gfloat lok_doc_view_get_zoom (LOKDocView*
|
|||||||
* Returns: Part refers to either individual sheets in a Calc, or slides in Impress,
|
* Returns: Part refers to either individual sheets in a Calc, or slides in Impress,
|
||||||
* and has no relevance for Writer. Returns -1 if no document is set currently.
|
* and has no relevance for Writer. Returns -1 if no document is set currently.
|
||||||
*/
|
*/
|
||||||
gint lok_doc_view_get_parts (LOKDocView* pDocView);
|
LOK_DOC_VIEW_DLLPUBLIC gint lok_doc_view_get_parts (LOKDocView* pDocView);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_get_part:
|
* lok_doc_view_get_part:
|
||||||
@@ -166,14 +173,14 @@ gint lok_doc_view_get_parts (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: Current part number of the document. Returns -1 if no document is set currently.
|
* Returns: Current part number of the document. Returns -1 if no document is set currently.
|
||||||
*/
|
*/
|
||||||
gint lok_doc_view_get_part (LOKDocView* pDocView);
|
LOK_DOC_VIEW_DLLPUBLIC gint lok_doc_view_get_part (LOKDocView* pDocView);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_set_part:
|
* lok_doc_view_set_part:
|
||||||
* @pDocView: The #LOKDocView instance
|
* @pDocView: The #LOKDocView instance
|
||||||
* @nPart:
|
* @nPart:
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_set_part (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_set_part (LOKDocView* pDocView,
|
||||||
int nPart);
|
int nPart);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -184,7 +191,7 @@ void lok_doc_view_set_part (LOKDocView*
|
|||||||
* Returns: Get current part name of loaded document. Returns null if no
|
* Returns: Get current part name of loaded document. Returns null if no
|
||||||
* document is set, or document has been destroyed using lok_doc_view_destroy_document.
|
* document is set, or document has been destroyed using lok_doc_view_destroy_document.
|
||||||
*/
|
*/
|
||||||
gchar* lok_doc_view_get_part_name (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC gchar* lok_doc_view_get_part_name (LOKDocView* pDocView,
|
||||||
int nPart);
|
int nPart);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -192,14 +199,14 @@ gchar* lok_doc_view_get_part_name (LOKDocView*
|
|||||||
* @pDocView: The #LOKDocView instance
|
* @pDocView: The #LOKDocView instance
|
||||||
* @nPartMode:
|
* @nPartMode:
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_set_partmode (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_set_partmode (LOKDocView* pDocView,
|
||||||
int nPartMode);
|
int nPartMode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_reset_view:
|
* lok_doc_view_reset_view:
|
||||||
* @pDocView: The #LOKDocView instance
|
* @pDocView: The #LOKDocView instance
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_reset_view (LOKDocView* pDocView);
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_reset_view (LOKDocView* pDocView);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_set_edit:
|
* lok_doc_view_set_edit:
|
||||||
@@ -208,7 +215,7 @@ void lok_doc_view_reset_view (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Sets if the viewer is actually an editor or not.
|
* Sets if the viewer is actually an editor or not.
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_set_edit (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_set_edit (LOKDocView* pDocView,
|
||||||
gboolean bEdit);
|
gboolean bEdit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -219,7 +226,7 @@ void lok_doc_view_set_edit (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: %TRUE if the given pDocView is in edit mode.
|
* Returns: %TRUE if the given pDocView is in edit mode.
|
||||||
*/
|
*/
|
||||||
gboolean lok_doc_view_get_edit (LOKDocView* pDocView);
|
LOK_DOC_VIEW_DLLPUBLIC gboolean lok_doc_view_get_edit (LOKDocView* pDocView);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_post_command:
|
* lok_doc_view_post_command:
|
||||||
@@ -230,7 +237,7 @@ gboolean lok_doc_view_get_edit (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Posts the .uno: command to the LibreOfficeKit.
|
* Posts the .uno: command to the LibreOfficeKit.
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_post_command (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_post_command (LOKDocView* pDocView,
|
||||||
const gchar* pCommand,
|
const gchar* pCommand,
|
||||||
const gchar* pArguments,
|
const gchar* pArguments,
|
||||||
gboolean bNotifyWhenFinished);
|
gboolean bNotifyWhenFinished);
|
||||||
@@ -245,7 +252,7 @@ void lok_doc_view_post_command (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: A json mapping of the possible values for the given command
|
* Returns: A json mapping of the possible values for the given command
|
||||||
*/
|
*/
|
||||||
gchar * lok_doc_view_get_command_values (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC gchar * lok_doc_view_get_command_values (LOKDocView* pDocView,
|
||||||
const gchar* pCommand);
|
const gchar* pCommand);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -257,7 +264,7 @@ gchar * lok_doc_view_get_command_values (LOKDocView*
|
|||||||
* Highlights the next matching text in the view. `search-not-found` signal will
|
* Highlights the next matching text in the view. `search-not-found` signal will
|
||||||
* be emitted when no search is found
|
* be emitted when no search is found
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_find_next (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_find_next (LOKDocView* pDocView,
|
||||||
const gchar* pText,
|
const gchar* pText,
|
||||||
gboolean bHighlightAll);
|
gboolean bHighlightAll);
|
||||||
|
|
||||||
@@ -270,7 +277,7 @@ void lok_doc_view_find_next (LOKDocView*
|
|||||||
* Highlights the previous matching text in the view. `search-not-found` signal
|
* Highlights the previous matching text in the view. `search-not-found` signal
|
||||||
* will be emitted when no search is found
|
* will be emitted when no search is found
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_find_prev (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_find_prev (LOKDocView* pDocView,
|
||||||
const gchar* pText,
|
const gchar* pText,
|
||||||
gboolean bHighlightAll);
|
gboolean bHighlightAll);
|
||||||
|
|
||||||
@@ -282,7 +289,7 @@ void lok_doc_view_find_prev (LOKDocView*
|
|||||||
* Highlights all matching texts in the view. `search-not-found` signal
|
* Highlights all matching texts in the view. `search-not-found` signal
|
||||||
* will be emitted when no search is found
|
* will be emitted when no search is found
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_highlight_all (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_highlight_all (LOKDocView* pDocView,
|
||||||
const gchar* pText);
|
const gchar* pText);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -295,7 +302,7 @@ void lok_doc_view_highlight_all (LOKDocView*
|
|||||||
* Returns: Selected text. The caller must free the returned buffer after
|
* Returns: Selected text. The caller must free the returned buffer after
|
||||||
* use. Returns null if no document is set.
|
* use. Returns null if no document is set.
|
||||||
*/
|
*/
|
||||||
gchar* lok_doc_view_copy_selection (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC gchar* lok_doc_view_copy_selection (LOKDocView* pDocView,
|
||||||
const gchar* pMimeType,
|
const gchar* pMimeType,
|
||||||
gchar** pUsedMimeType);
|
gchar** pUsedMimeType);
|
||||||
|
|
||||||
@@ -310,7 +317,7 @@ gchar* lok_doc_view_copy_selection (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: if pData was pasted successfully.
|
* Returns: if pData was pasted successfully.
|
||||||
*/
|
*/
|
||||||
gboolean lok_doc_view_paste (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC gboolean lok_doc_view_paste (LOKDocView* pDocView,
|
||||||
const gchar* pMimeType,
|
const gchar* pMimeType,
|
||||||
const gchar* pData,
|
const gchar* pData,
|
||||||
gsize nSize);
|
gsize nSize);
|
||||||
@@ -323,7 +330,7 @@ gboolean lok_doc_view_paste (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Set the password for password protected documents
|
* Set the password for password protected documents
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_set_document_password (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_set_document_password (LOKDocView* pDocView,
|
||||||
const gchar* pURL,
|
const gchar* pURL,
|
||||||
const gchar* pPassword);
|
const gchar* pPassword);
|
||||||
|
|
||||||
@@ -341,7 +348,7 @@ void lok_doc_view_set_document_password (LOKDocView*
|
|||||||
* "ProductExtension": ".0.0.alpha0",
|
* "ProductExtension": ".0.0.alpha0",
|
||||||
* "BuildId": "<full 40 char git hash>"}
|
* "BuildId": "<full 40 char git hash>"}
|
||||||
*/
|
*/
|
||||||
gchar* lok_doc_view_get_version_info (LOKDocView* pDocView);
|
LOK_DOC_VIEW_DLLPUBLIC gchar* lok_doc_view_get_version_info (LOKDocView* pDocView);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lok_doc_view_pixel_to_twip:
|
* lok_doc_view_pixel_to_twip:
|
||||||
@@ -352,7 +359,7 @@ gchar* lok_doc_view_get_version_info (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: The corresponding value in twips
|
* Returns: The corresponding value in twips
|
||||||
*/
|
*/
|
||||||
gfloat lok_doc_view_pixel_to_twip (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC gfloat lok_doc_view_pixel_to_twip (LOKDocView* pDocView,
|
||||||
float fInput);
|
float fInput);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -364,7 +371,7 @@ gfloat lok_doc_view_pixel_to_twip (LOKDocView*
|
|||||||
*
|
*
|
||||||
* Returns: The corresponding value in pixels
|
* Returns: The corresponding value in pixels
|
||||||
*/
|
*/
|
||||||
gfloat lok_doc_view_twip_to_pixel (LOKDocView* pDocView,
|
LOK_DOC_VIEW_DLLPUBLIC gfloat lok_doc_view_twip_to_pixel (LOKDocView* pDocView,
|
||||||
float fInput);
|
float fInput);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -372,7 +379,7 @@ gfloat lok_doc_view_twip_to_pixel (LOKDocView*
|
|||||||
* @pDocView: The #LOKDocView instance
|
* @pDocView: The #LOKDocView instance
|
||||||
* @pArguments: (nullable) (allow-none): see lok::Document::sendContentControlEvent() for the details.
|
* @pArguments: (nullable) (allow-none): see lok::Document::sendContentControlEvent() for the details.
|
||||||
*/
|
*/
|
||||||
void lok_doc_view_send_content_control_event(LOKDocView* pDocView, const gchar* pArguments);
|
LOK_DOC_VIEW_DLLPUBLIC void lok_doc_view_send_content_control_event(LOKDocView* pDocView, const gchar* pArguments);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|||||||
@@ -29,12 +29,17 @@ $(eval $(call gb_Executable_add_cxxflags,gtktiledviewer,\
|
|||||||
|
|
||||||
$(eval $(call gb_Executable_add_libs,gtktiledviewer,\
|
$(eval $(call gb_Executable_add_libs,gtktiledviewer,\
|
||||||
$(GTK3_LIBS) \
|
$(GTK3_LIBS) \
|
||||||
|
))
|
||||||
|
|
||||||
|
ifneq ($(OS), WNT)
|
||||||
|
$(eval $(call gb_Executable_add_libs,gtktiledviewer,\
|
||||||
-lX11 \
|
-lX11 \
|
||||||
-lXext \
|
-lXext \
|
||||||
-lXrender \
|
-lXrender \
|
||||||
-lSM \
|
-lSM \
|
||||||
-lICE \
|
-lICE \
|
||||||
))
|
))
|
||||||
|
endif
|
||||||
|
|
||||||
$(eval $(call gb_Executable_use_libraries,gtktiledviewer,\
|
$(eval $(call gb_Executable_use_libraries,gtktiledviewer,\
|
||||||
libreofficekitgtk \
|
libreofficekitgtk \
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ $(eval $(call gb_Library_add_libs,libreofficekitgtk,\
|
|||||||
|
|
||||||
$(eval $(call gb_Library_add_defs,libreofficekitgtk,\
|
$(eval $(call gb_Library_add_defs,libreofficekitgtk,\
|
||||||
-DLOK_PATH="\"$(LIBDIR)/libreoffice/$(LIBO_LIB_FOLDER)\"" \
|
-DLOK_PATH="\"$(LIBDIR)/libreoffice/$(LIBO_LIB_FOLDER)\"" \
|
||||||
|
-DLOK_DOC_VIEW_IMPLEMENTATION \
|
||||||
))
|
))
|
||||||
|
|
||||||
ifeq ($(OS),$(filter LINUX %BSD SOLARIS, $(OS)))
|
ifeq ($(OS),$(filter LINUX %BSD SOLARIS, $(OS)))
|
||||||
|
|||||||
@@ -33,6 +33,16 @@ $(eval $(call gb_Module_add_targets,libreofficekit,\
|
|||||||
UIConfig_libreofficekit \
|
UIConfig_libreofficekit \
|
||||||
))
|
))
|
||||||
|
|
||||||
|
else ifeq ($(OS),WNT)
|
||||||
|
|
||||||
|
ifneq ($(ENABLE_GTKTILEDVIEWER),)
|
||||||
|
$(eval $(call gb_Module_add_targets,libreofficekit,\
|
||||||
|
Library_libreofficekitgtk \
|
||||||
|
Executable_gtktiledviewer \
|
||||||
|
Package_selectionhandles \
|
||||||
|
))
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 et:
|
# vim: set ts=4 sw=4 et:
|
||||||
|
|||||||
@@ -97,6 +97,19 @@ To debug with `gdb`:
|
|||||||
|
|
||||||
before `bin/run`, this will run gtktiledviewer in the debugger instead.
|
before `bin/run`, this will run gtktiledviewer in the debugger instead.
|
||||||
|
|
||||||
|
### Building and running gtktiledviewer on Windows
|
||||||
|
|
||||||
|
A pre-requisite is pre-built GTK3 libraries. See [official GTK documentation](https://www.gtk.org/docs/installations/windows/).
|
||||||
|
Building of gtktiledviewer on Windows is enabled by passing
|
||||||
|
|
||||||
|
--with-gtk3-build=<path/to/GTK3/build/directory>
|
||||||
|
|
||||||
|
to configure.
|
||||||
|
|
||||||
|
Running the compiled executable requires GTK's bin in PATH:
|
||||||
|
|
||||||
|
PATH=${PATH}:/cygdrive/c/gtk-build/gtk/x64/release/bin bin/run gtktiledviewer --lo-path=$(cygpath -am $PWD/instdir/program) ../test.odt
|
||||||
|
|
||||||
## LibreOfficeKitGtk
|
## LibreOfficeKitGtk
|
||||||
|
|
||||||
Currently consists of only a very basic GTK document viewer widget.
|
Currently consists of only a very basic GTK document viewer widget.
|
||||||
|
|||||||
@@ -338,7 +338,6 @@ static void lok_doc_view_initable_iface_init (GInitableIface *iface);
|
|||||||
static void callbackWorker (int nType, const char* pPayload, void* pData);
|
static void callbackWorker (int nType, const char* pPayload, void* pData);
|
||||||
static void updateClientZoom (LOKDocView *pDocView);
|
static void updateClientZoom (LOKDocView *pDocView);
|
||||||
|
|
||||||
SAL_DLLPUBLIC_EXPORT GType lok_doc_view_get_type();
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||||
|
|||||||
Reference in New Issue
Block a user