...
 
Commits (5)
......@@ -56,6 +56,7 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_SED
......@@ -164,7 +165,7 @@ ZLIB_LIBS=-lz
AC_SUBST(ZLIB_LIBS)
PKG_CHECK_MODULES(LIBDOCUMENT, gtk+-3.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gmodule-no-export-2.0 >= $GLIB_REQUIRED gmodule-2.0)
PKG_CHECK_MODULES(LIBVIEW, gtk+-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED)
PKG_CHECK_MODULES(LIBVIEW, gtk+-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED gio-unix-2.0)
PKG_CHECK_MODULES(BACKEND, cairo >= $CAIRO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED)
PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-3.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED gmodule-no-export-2.0 >= $GLIB_REQUIRED)
......
......@@ -172,6 +172,10 @@
<title>Index of new symbols in 3.18</title>
<xi:include href="xml/api-index-3.18.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-30" role="3.30">
<title>Index of new symbols in 3.30</title>
<xi:include href="xml/api-index-3.30.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
......
......@@ -784,6 +784,11 @@ ev_init
ev_shutdown
</SECTION>
<SECTION>
<FILE>ev-portal</FILE>
ev_should_use_portal
</SECTION>
<SECTION>
<FILE>ev-mapping</FILE>
EvMapping
......
......@@ -40,6 +40,7 @@ INST_H_SRC_FILES = \
ev-mapping-list.h \
ev-media.h \
ev-page.h \
ev-portal.h \
ev-render-context.h \
ev-selection.h \
ev-transition-effect.h
......@@ -86,6 +87,7 @@ libevdocument3_la_SOURCES= \
ev-media.c \
ev-module.c \
ev-page.c \
ev-portal.c \
ev-render-context.c \
ev-selection.c \
ev-transition-effect.c \
......
/*
* Evince is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* Evince is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "ev-portal.h"
/* Copied from gtk+, under LGPL2.1+ */
/**
* ev_should_use_portal:
*
* Checks whether evince should use the portal.
*
* Returns: whether evince should use the portal
*
* Since: 3.30
*/
gboolean
ev_should_use_portal (void)
{
static const char *use_portal = NULL;
if (G_UNLIKELY (use_portal == NULL))
{
char *path;
path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS))
use_portal = "1";
else
{
use_portal = g_getenv ("GTK_USE_PORTAL");
if (!use_portal)
use_portal = "";
}
g_free (path);
}
return use_portal[0] == '1';
}
/*
* Copyright © 2018 Christian Persch
*
* Evince is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* Evince is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
#error "Only <evince-document.h> can be included directly."
#endif
#ifndef EV_PORTAL_H
#define EV_PORTAL_H
#include <glib.h>
G_BEGIN_DECLS
gboolean ev_should_use_portal (void);
G_END_DECLS
#endif /* EV_PORTAL_H */
This diff is collapsed.