diff options
Diffstat (limited to 'libview')
-rw-r--r-- | libview/Makefile.am | 2 | ||||
-rw-r--r-- | libview/ev-document-model.c | 12 | ||||
-rw-r--r-- | libview/ev-jobs.c | 135 | ||||
-rw-r--r-- | libview/ev-page-accessible.c | 2 | ||||
-rw-r--r-- | libview/ev-pixbuf-cache.c | 12 | ||||
-rw-r--r-- | libview/ev-pixbuf-cache.h | 2 | ||||
-rw-r--r-- | libview/ev-print-operation.c | 4 | ||||
-rw-r--r-- | libview/ev-stock-icons.c | 17 | ||||
-rw-r--r-- | libview/ev-stock-icons.h | 1 | ||||
-rw-r--r-- | libview/ev-timeline.c | 4 | ||||
-rw-r--r-- | libview/ev-timeline.h | 2 | ||||
-rw-r--r-- | libview/ev-transition-animation.c | 2 | ||||
-rw-r--r-- | libview/ev-transition-animation.h | 2 | ||||
-rw-r--r-- | libview/ev-view-presentation.c | 3 | ||||
-rw-r--r-- | libview/ev-view.c | 2 | ||||
-rw-r--r-- | libview/ev-web-view.c | 2 | ||||
-rw-r--r-- | libview/ev-web-view.h | 1 | ||||
-rw-r--r-- | libview/meson.build | 122 |
18 files changed, 161 insertions, 166 deletions
diff --git a/libview/Makefile.am b/libview/Makefile.am index be5f7264..0835e9c3 100644 --- a/libview/Makefile.am +++ b/libview/Makefile.am @@ -141,7 +141,7 @@ AtrilView-$(EV_API_VERSION).gir: libatrilview.la Makefile $(INST_H_FILES) $(filt --include=GdkPixbuf-2.0 \ --include=Gtk-3.0 \ --include=AtrilDocument-$(EV_API_VERSION) \ - --library=atrilview \ + --library=libatrilview.la \ --libtool="$(LIBTOOL)" \ --output $@ \ --pkg atril-document-$(EV_API_VERSION) \ diff --git a/libview/ev-document-model.c b/libview/ev-document-model.c index d5d97f62..2e3acfd1 100644 --- a/libview/ev-document-model.c +++ b/libview/ev-document-model.c @@ -175,7 +175,7 @@ ev_document_model_get_property (GObject *object, g_value_set_enum (value, model->page_layout); break; case PROP_DUAL_PAGE: - g_value_set_boolean (value, ev_document_model_get_dual_page (model)); + g_value_set_boolean (value, ev_document_model_get_page_layout (model)); break; case PROP_DUAL_PAGE_ODD_LEFT: g_value_set_boolean (value, ev_document_model_get_dual_page_odd_pages_left (model)); @@ -500,7 +500,7 @@ _ev_document_model_set_dual_page_internal (EvDocumentModel *model, if (dual_page == model->dual_page) return; - model->dual_page = dual_page; + model->dual_page = (dual_page != FALSE); g_object_notify (G_OBJECT (model), "dual-page"); } @@ -566,7 +566,7 @@ ev_document_model_set_inverted_colors (EvDocumentModel *model, if (inverted_colors == model->inverted_colors) return; - model->inverted_colors = inverted_colors; + model->inverted_colors = (inverted_colors != FALSE); g_object_notify (G_OBJECT (model), "inverted-colors"); } @@ -590,7 +590,7 @@ ev_document_model_set_continuous (EvDocumentModel *model, if (continuous == model->continuous) return; - model->continuous = continuous; + model->continuous = (continuous != FALSE); g_object_notify (G_OBJECT (model), "continuous"); } @@ -634,7 +634,7 @@ ev_document_model_set_dual_page_odd_pages_left (EvDocumentModel *model, if (odd_left == model->dual_page_odd_left) return; - model->dual_page_odd_left = odd_left; + model->dual_page_odd_left = (odd_left != FALSE); g_object_notify (G_OBJECT (model), "dual-odd-left"); } @@ -658,7 +658,7 @@ ev_document_model_set_fullscreen (EvDocumentModel *model, if (fullscreen == model->fullscreen) return; - model->fullscreen = fullscreen; + model->fullscreen = (fullscreen != FALSE); g_object_notify (G_OBJECT (model), "fullscreen"); } diff --git a/libview/ev-jobs.c b/libview/ev-jobs.c index dca41a9a..8e33ee5d 100644 --- a/libview/ev-jobs.c +++ b/libview/ev-jobs.c @@ -41,9 +41,6 @@ #include "ev-debug.h" #include <gtk/gtk.h> -#if ENABLE_EPUB -#include <webkit2/webkit2.h> -#endif #include <errno.h> #include <glib/gstdio.h> #include <glib/gi18n-lib.h> @@ -612,7 +609,18 @@ ev_job_render_run (EvJob *job) rc = ev_render_context_new (ev_page, job_render->rotation, job_render->scale); g_object_unref (ev_page); - job_render->surface = ev_document_render (job->document, rc); + if ((job_render->surface = ev_document_render (job->document, rc)) == NULL) { + ev_document_fc_mutex_unlock (); + ev_document_doc_mutex_unlock (); + g_object_unref (rc); + ev_job_failed (job, + EV_DOCUMENT_ERROR, + EV_DOCUMENT_ERROR_INVALID, + _("Failed to render page %d"), + job_render->page); + return FALSE; + } + /* If job was cancelled during the page rendering, * we return now, so that the thread is finished ASAP */ @@ -812,77 +820,6 @@ ev_job_thumbnail_dispose (GObject *object) (* G_OBJECT_CLASS (ev_job_thumbnail_parent_class)->dispose) (object); } -#if ENABLE_EPUB -static void -snapshot_callback(WebKitWebView *webview, - GAsyncResult *results, - EvJobThumbnail *job_thumb) -{ - GError *error = NULL; - - ev_document_doc_mutex_lock (); - - EvPage *page = ev_document_get_page (EV_JOB(job_thumb)->document, job_thumb->page); - job_thumb->surface = webkit_web_view_get_snapshot_finish (webview, - results, - &error); - - if (error) { - g_warning ("Error retrieving a snapshot: %s", error->message); - } - - EvRenderContext *rc = ev_render_context_new (page, job_thumb->rotation, job_thumb->scale); - EvPage *screenshotpage; - screenshotpage = ev_page_new(job_thumb->page); - screenshotpage->backend_page = (EvBackendPage)job_thumb->surface; - screenshotpage->backend_destroy_func = (EvBackendPageDestroyFunc)cairo_surface_destroy; - ev_render_context_set_page(rc,screenshotpage); - - job_thumb->thumbnail = ev_document_thumbnails_get_thumbnail (EV_DOCUMENT_THUMBNAILS (EV_JOB(job_thumb)->document), - rc, TRUE); - g_object_unref(screenshotpage); - g_object_unref(rc); - - ev_document_doc_mutex_unlock (); - ev_job_succeeded (EV_JOB(job_thumb)); - - gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET (webview))); -} - -static void -web_thumbnail_get_screenshot_cb (WebKitWebView *webview, - WebKitLoadEvent event, - EvJobThumbnail *job_thumb) -{ - if (event != WEBKIT_LOAD_FINISHED || ev_job_is_failed (EV_JOB(job_thumb))) { - return; - } - - webkit_web_view_get_snapshot (webview, - WEBKIT_SNAPSHOT_REGION_VISIBLE, - WEBKIT_SNAPSHOT_OPTIONS_NONE, - NULL, - (GAsyncReadyCallback)snapshot_callback, - g_object_ref (job_thumb)); -} - -static gboolean -webview_load_failed_cb (WebKitWebView *webview, - WebKitLoadEvent event, - gchar *failing_uri, - gpointer error, - EvJobThumbnail *job_thumb) -{ - GError *e = (GError *) error; - g_warning ("Error loading data from %s: %s", failing_uri, e->message); - ev_job_failed_from_error (EV_JOB(job_thumb), e); - - gtk_widget_destroy (gtk_widget_get_toplevel (GTK_WIDGET (webview))); - return TRUE; -} - -#endif /* ENABLE_EPUB */ - static gboolean ev_job_thumbnail_run (EvJob *job) { @@ -892,53 +829,19 @@ ev_job_thumbnail_run (EvJob *job) ev_debug_message (DEBUG_JOBS, "%d (%p)", job_thumb->page, job); ev_profiler_start (EV_PROFILE_JOBS, "%s (%p)", EV_GET_TYPE_NAME (job), job); - if (job->document->iswebdocument) { - /* Do not block the main loop */ - if (!ev_document_doc_mutex_trylock ()) - return TRUE; - } else { - ev_document_doc_mutex_lock (); - } + ev_document_doc_mutex_lock (); page = ev_document_get_page (job->document, job_thumb->page); ev_document_doc_mutex_unlock (); - if (job->document->iswebdocument == TRUE ) { - rc = ev_render_context_new (page, 0, job_thumb->scale); - } else { - rc = ev_render_context_new (page, job_thumb->rotation, job_thumb->scale); - } + rc = ev_render_context_new (page, job_thumb->rotation, job_thumb->scale); g_object_unref (page); -#if ENABLE_EPUB - if (job->document->iswebdocument == TRUE) { - GtkWidget *webview; - GtkWidget *offscreenwindow; - - webview = webkit_web_view_new (); - offscreenwindow = gtk_offscreen_window_new (); - - gtk_container_add (GTK_CONTAINER(offscreenwindow), GTK_WIDGET (webview)); - gtk_window_set_default_size (GTK_WINDOW(offscreenwindow), 800, 1080); - gtk_widget_show_all (offscreenwindow); - - g_signal_connect (WEBKIT_WEB_VIEW (webview), "load-changed", - G_CALLBACK (web_thumbnail_get_screenshot_cb), - g_object_ref (job_thumb)); - g_signal_connect (WEBKIT_WEB_VIEW(webview), "load-failed", - G_CALLBACK(webview_load_failed_cb), - g_object_ref (job_thumb)); - webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webview), (gchar*) rc->page->backend_page); - } - else -#endif /* ENABLE_EPUB */ - { - ev_document_doc_mutex_lock (); - job_thumb->thumbnail = ev_document_thumbnails_get_thumbnail (EV_DOCUMENT_THUMBNAILS (job->document), - rc, TRUE); - ev_document_doc_mutex_unlock (); - ev_job_succeeded (job); - } + ev_document_doc_mutex_lock (); + job_thumb->thumbnail = ev_document_thumbnails_get_thumbnail (EV_DOCUMENT_THUMBNAILS (job->document), + rc, TRUE); + ev_document_doc_mutex_unlock (); + ev_job_succeeded (job); g_object_unref (rc); return FALSE; diff --git a/libview/ev-page-accessible.c b/libview/ev-page-accessible.c index fba189c5..112f8020 100644 --- a/libview/ev-page-accessible.c +++ b/libview/ev-page-accessible.c @@ -37,7 +37,6 @@ struct _EvPageAccessiblePrivate { gboolean children_initialized; }; - enum { PROP_0, PROP_VIEW_ACCESSIBLE, @@ -412,7 +411,6 @@ treat_as_soft_return (EvView *view, EvRectangle *next_word_end; gint prev_offset, next_offset; - if (!log_attrs[offset].is_white) return FALSE; diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c index 46031d7e..163267f6 100644 --- a/libview/ev-pixbuf-cache.c +++ b/libview/ev-pixbuf-cache.c @@ -72,7 +72,6 @@ struct _EvPixbufCacheClass void (* job_finished) (EvPixbufCache *pixbuf_cache); }; - enum { JOB_FINISHED, @@ -92,7 +91,6 @@ static gboolean new_selection_surface_needed(EvPixbufCache *pixbuf_cac gint page, gfloat scale); - /* These are used for iterating through the prev and next arrays */ #define FIRST_VISIBLE_PREV(pixbuf_cache) \ (MAX (0, pixbuf_cache->preload_cache_size - pixbuf_cache->start_page)) @@ -223,7 +221,6 @@ ev_pixbuf_cache_dispose (GObject *object) G_OBJECT_CLASS (ev_pixbuf_cache_parent_class)->dispose (object); } - EvPixbufCache * ev_pixbuf_cache_new (GtkWidget *view, EvDocumentModel *model, @@ -327,6 +324,12 @@ job_finished_cb (EvJob *job, job_info = find_job_cache (pixbuf_cache, job_render->page); + if (ev_job_is_failed (job)) { + job_info->job = NULL; + g_object_unref (job); + return; + } + copy_job_to_job_info (job_render, job_info, pixbuf_cache); g_signal_emit (pixbuf_cache, signals[JOB_FINISHED], 0, job_info->region); } @@ -979,7 +982,6 @@ ev_pixbuf_cache_clear (EvPixbufCache *pixbuf_cache) } } - void ev_pixbuf_cache_style_changed (EvPixbufCache *pixbuf_cache) { @@ -1259,7 +1261,6 @@ ev_pixbuf_cache_set_selection_list (EvPixbufCache *pixbuf_cache, } } - /* Returns what the pixbuf cache thinks is */ GList * @@ -1350,4 +1351,3 @@ ev_pixbuf_cache_reload_page (EvPixbufCache *pixbuf_cache, EV_JOB_PRIORITY_URGENT); } - diff --git a/libview/ev-pixbuf-cache.h b/libview/ev-pixbuf-cache.h index 5617ca9b..941e6862 100644 --- a/libview/ev-pixbuf-cache.h +++ b/libview/ev-pixbuf-cache.h @@ -39,8 +39,6 @@ G_BEGIN_DECLS #define EV_PIXBUF_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_PIXBUF_CACHE, EvPixbufCache)) #define EV_IS_PIXBUF_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_PIXBUF_CACHE)) - - /* The coordinates in the rect here are at scale == 1.0, so that we can ignore * resizings. There is one per page, maximum. */ diff --git a/libview/ev-print-operation.c b/libview/ev-print-operation.c index baccc179..f2e90ba3 100644 --- a/libview/ev-print-operation.c +++ b/libview/ev-print-operation.c @@ -1257,8 +1257,8 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog *dial export->pages_per_sheet = MAX (1, gtk_print_settings_get_number_up (print_settings)); export->copies = gtk_print_settings_get_n_copies (print_settings); - export->collate = gtk_print_settings_get_collate (print_settings); - export->reverse = gtk_print_settings_get_reverse (print_settings); + export->collate = (gtk_print_settings_get_collate (print_settings) != FALSE); + export->reverse = (gtk_print_settings_get_reverse (print_settings) != FALSE); if (export->collate) { export->uncollated_copies = export->copies; diff --git a/libview/ev-stock-icons.c b/libview/ev-stock-icons.c index 58da21b1..7447955a 100644 --- a/libview/ev-stock-icons.c +++ b/libview/ev-stock-icons.c @@ -51,15 +51,13 @@ static const EvStockIcon stock_icons [] = { { EV_STOCK_SEND_TO, "document-send"}, }; -static gchar *ev_icons_path; +#define EV_ICONS_PATH ATRILDATADIR "/icons" static void ev_stock_icons_add_icons_path_for_screen (GdkScreen *screen) { GtkIconTheme *icon_theme; - g_return_if_fail (ev_icons_path != NULL); - icon_theme = screen ? gtk_icon_theme_get_for_screen (screen) : gtk_icon_theme_get_default (); if (icon_theme) { gchar **path = NULL; @@ -71,13 +69,13 @@ ev_stock_icons_add_icons_path_for_screen (GdkScreen *screen) */ gtk_icon_theme_get_search_path (icon_theme, &path, &n_paths); for (i = n_paths - 1; i >= 0; i--) { - if (g_ascii_strcasecmp (ev_icons_path, path[i]) == 0) + if (g_ascii_strcasecmp (EV_ICONS_PATH, path[i]) == 0) break; } if (i < 0) gtk_icon_theme_append_search_path (icon_theme, - ev_icons_path); + EV_ICONS_PATH); g_strfreev (path); } @@ -95,8 +93,6 @@ ev_stock_icons_init (void) GtkIconSource *source; gint i; - ev_icons_path = g_build_filename (ATRILDATADIR, "icons", NULL); - factory = gtk_icon_factory_new (); gtk_icon_factory_add_default (factory); @@ -128,10 +124,3 @@ ev_stock_icons_set_screen (GdkScreen *screen) ev_stock_icons_add_icons_path_for_screen (screen); } - -void -ev_stock_icons_shutdown (void) -{ - g_free (ev_icons_path); -} - diff --git a/libview/ev-stock-icons.h b/libview/ev-stock-icons.h index ab9671e1..363b0c62 100644 --- a/libview/ev-stock-icons.h +++ b/libview/ev-stock-icons.h @@ -50,7 +50,6 @@ G_BEGIN_DECLS #define EV_STOCK_SEND_TO "document-send" void ev_stock_icons_init (void); -void ev_stock_icons_shutdown (void); void ev_stock_icons_set_screen (GdkScreen *screen); G_END_DECLS diff --git a/libview/ev-timeline.c b/libview/ev-timeline.c index ce4153dc..f37aa189 100644 --- a/libview/ev-timeline.c +++ b/libview/ev-timeline.c @@ -56,10 +56,8 @@ enum { static guint signals [LAST_SIGNAL] = { 0, }; - G_DEFINE_TYPE_WITH_PRIVATE (EvTimeline, ev_timeline, G_TYPE_OBJECT) - static void ev_timeline_init (EvTimeline *timeline) { @@ -389,7 +387,7 @@ ev_timeline_set_loop (EvTimeline *timeline, g_return_if_fail (EV_IS_TIMELINE (timeline)); priv = ev_timeline_get_instance_private (timeline); - priv->loop = loop; + priv->loop = (loop != FALSE); g_object_notify (G_OBJECT (timeline), "loop"); } diff --git a/libview/ev-timeline.h b/libview/ev-timeline.h index d4f6ba78..4a2c86a9 100644 --- a/libview/ev-timeline.h +++ b/libview/ev-timeline.h @@ -59,7 +59,6 @@ struct EvTimelineClass { gdouble progress); }; - GType ev_timeline_get_type (void) G_GNUC_CONST; EvTimeline *ev_timeline_new (guint duration); @@ -84,7 +83,6 @@ void ev_timeline_set_duration (EvTimeline *ti gdouble ev_timeline_get_progress (EvTimeline *timeline); - G_END_DECLS #endif /* __EV_TIMELINE_H__ */ diff --git a/libview/ev-transition-animation.c b/libview/ev-transition-animation.c index f41aa85c..8589e1b4 100644 --- a/libview/ev-transition-animation.c +++ b/libview/ev-transition-animation.c @@ -41,10 +41,8 @@ enum { PROP_DEST_SURFACE }; - G_DEFINE_TYPE_WITH_PRIVATE (EvTransitionAnimation, ev_transition_animation, EV_TYPE_TIMELINE) - static void ev_transition_animation_init (EvTransitionAnimation *animation) { diff --git a/libview/ev-transition-animation.h b/libview/ev-transition-animation.h index 8691fd66..f6e374f4 100644 --- a/libview/ev-transition-animation.h +++ b/libview/ev-transition-animation.h @@ -50,7 +50,6 @@ struct EvTransitionAnimationClass { EvTimelineClass parent_class; }; - GType ev_transition_animation_get_type (void) G_GNUC_CONST; EvTransitionAnimation * ev_transition_animation_new (EvTransitionEffect *effect); @@ -67,7 +66,6 @@ void ev_transition_animation_paint (EvTransition GdkRectangle page_area); gboolean ev_transition_animation_ready (EvTransitionAnimation *animation); - G_END_DECLS #endif /* __EV_TRANSITION_ANIMATION_H__ */ diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c index 0bcfe54d..ac723eb2 100644 --- a/libview/ev-view-presentation.c +++ b/libview/ev-view-presentation.c @@ -425,7 +425,7 @@ ev_view_presentation_update_current_page (EvViewPresentation *pview, { gint jump; - if (page < 0 || page >= ev_document_get_n_pages (pview->document)) + if (page >= ev_document_get_n_pages (pview->document)) return; ev_view_presentation_animation_cancel (pview); @@ -1385,7 +1385,6 @@ ev_view_presentation_scroll_event (GtkWidget *widget, return TRUE; } - static void add_change_page_binding_keypad (GtkBindingSet *binding_set, guint keyval, diff --git a/libview/ev-view.c b/libview/ev-view.c index 2e01035e..86c83944 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -5621,7 +5621,6 @@ ev_view_style_updated (GtkWidget *widget) /*** Drawing ***/ - static void draw_rubberband (EvView *view, cairo_t *cr, @@ -5652,7 +5651,6 @@ draw_rubberband (EvView *view, cairo_restore (cr); } - static void highlight_find_results (EvView *view, cairo_t *cr, int page) { diff --git a/libview/ev-web-view.c b/libview/ev-web-view.c index ecd7a02b..7c6c83f3 100644 --- a/libview/ev-web-view.c +++ b/libview/ev-web-view.c @@ -31,7 +31,6 @@ #include "ev-document-model.h" #include "ev-jobs.h" - typedef enum { EV_WEB_VIEW_FIND_NEXT, EV_WEB_VIEW_FIND_PREV @@ -322,7 +321,6 @@ ev_web_view_reload (EvWebView *webview) web_view_update_range_and_current_page (webview); } - gboolean ev_web_view_next_page (EvWebView *webview) { diff --git a/libview/ev-web-view.h b/libview/ev-web-view.h index 16b82ba8..02f7ef64 100644 --- a/libview/ev-web-view.h +++ b/libview/ev-web-view.h @@ -35,7 +35,6 @@ #include <glib-object.h> G_BEGIN_DECLS - typedef struct _EvWebView EvWebView; typedef struct _EvWebViewClass EvWebViewClass; diff --git a/libview/meson.build b/libview/meson.build new file mode 100644 index 00000000..f345a608 --- /dev/null +++ b/libview/meson.build @@ -0,0 +1,122 @@ +libview_private_headers = [ + 'ev-annotation-window.h', + 'ev-link-accessible.h', + 'ev-page-accessible.h', + 'ev-image-accessible.h', + 'ev-form-field-accessible.h', + 'ev-page-cache.h', + 'ev-pixbuf-cache.h', + 'ev-timeline.h', + 'ev-transition-animation.h', + 'ev-view-accessible.h', + 'ev-view-cursor.h', + 'ev-view-private.h', +] + +libview_headers = [ + 'ev-document-model.h', + 'ev-jobs.h', + 'ev-job-scheduler.h', + 'ev-print-operation.h', + 'ev-stock-icons.h', + 'ev-view.h', + 'ev-web-view.h', + 'ev-view-presentation.h', +] + +libview_sources = [ + 'ev-annotation-window.c', + 'ev-document-model.c', + 'ev-jobs.c', + 'ev-job-scheduler.c', + 'ev-link-accessible.c', + 'ev-page-accessible.c', + 'ev-image-accessible.c', + 'ev-form-field-accessible.c', + 'ev-page-cache.c', + 'ev-pixbuf-cache.c', + 'ev-print-operation.c', + 'ev-stock-icons.c', + 'ev-timeline.c', + 'ev-transition-animation.c', + 'ev-view.c', + 'ev-web-view.c', + 'ev-view-accessible.c', + 'ev-view-cursor.c', + 'ev-view-presentation.c', + libview_headers, +] + +libview_header_dir = join_paths(header_dir, 'libview') + +libview_include = include_directories('.') + +libview_enums = gnome.mkenums( + 'ev-view-type-builtins', + sources : libview_headers, + c_template : 'ev-view-type-builtins.c.template', + h_template : 'ev-view-type-builtins.h.template', + identifier_prefix : 'Ev', + symbol_prefix : 'ev', + install_header: true, + install_dir: join_paths(includedir, libview_header_dir), +) + +libview_sources += libview_enums + +libview_marshal = gnome.genmarshal( + 'ev-view-marshal', + sources: 'ev-view-marshal.list', + prefix: 'ev_view_marshal' +) + +libview_deps = [ + libdocument_dep, + config_h, + gail, + glib, + gtk, + gtk_unix_print, + math, +] + +if get_option('epub') + libview_deps += webkit +endif + +libview = library( + 'view', + libview_sources + libview_private_headers + libdoc_enums + libview_marshal, + include_directories: include_dirs, + dependencies: libview_deps, + soversion: binary_major_version, + version: binary_version, + install: true, +) + +libview_dep = declare_dependency( + link_with: libview, + include_directories: include_dirs, + dependencies: libview_deps, +) + +install_headers( + libview_headers, + subdir: libview_header_dir, +) + +if get_option('introspection') + libview_gir = gnome.generate_gir( + libview, + namespace: 'AtrilView', + nsversion: api_version, + sources: libview_sources, + identifier_prefix: 'Ev', + symbol_prefix: 'ev', + includes: [introspection_includes, libdocument_gir[0]], + install: true, + install_dir_typelib: join_paths(libdir, 'girepository-1.0'), + install_dir_gir: join_paths(datadir, 'gir-1.0'), + export_packages: ['libview-' + api_version, 'libdocument-' + api_version], + ) +endif |