如何用 C/C++ 开发一个独立于平台的电子书阅读器?

发布于 2024-09-17 07:11:34 字数 370 浏览 4 评论 0原文

我正在尝试开发一个独立于平台的电子书阅读器(适用于移动设备)。目前我的重点是 epub。 作为概念证明,我们能够使用平台本身提供的功能(使用 webview、Xml Parser、Unzipper 等)为 Android 平台制作一个基本的 epub 阅读器。但现在我们想让它独立于平台,我们想用 C/C++ 来实现。我知道我们有 C/C++ 中的解压程序和 xml 解析器,这是我担心的渲染部分。我的问题是...

1.如何在不使用任何内置 android 视图的情况下进行渲染,以便它也可以在其他平台上工作? 2.对于epub来说,坚持使用webkit是否更好(我们正在考虑的平台都有webkit)?

到现在为止我还一无所知。有关于从哪里开始的指示吗?

BR, 拉吉夫

I'm trying to develop an ebook reader(for mobile devices) which is platform independent. Currently my focus is epub only.
As a proof of concept, we were able to make a basic epub reader for android platform, using the functionalities provided by the platform itself(using webview, Xml Parser, Unzipper etc). But now we want to make it platform independent and we want to do it in C/C++. I know we have unzippers and xml parsers in C/C++, its the rendering part I'm worried about. My questions are...

1.How can I do the rendering, without using any of the inbuilt android views, so that it will work on other platforms also?
2.Is it better to stick to webkit for epub(the platforms which we're considering all have webkit)?

As of now I'm clueless. Any pointers on where to start?

BR,
Rajeev

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浸婚纱 2024-09-24 07:11:34

您很可能必须将应用程序分为跨平台后端和特定于平台的前端。

如果您想在应用程序中实现所有电子酒吧的索引和搜索,这可能是跨平台部分的一部分。如果 epub 阅读器包含下载/传输的 epub 目录,则数据库(包括其访问方法)也可能是跨平台的(至少部分是跨平台的)。

然而,表示层,即用户界面,可能必须是特定于平台的。最好的情况是你可以想出一种中间 UI 描述语言,可以自动翻译成 Android / iPhone 用户界面。然而,这是一项艰巨的任务,如果您不想创建许多跨平台应用程序,则可能根本不值得尝试。

Most likely you will have to split your application into the cross-platform backend and a platform specific front-end.

If you want to implement indexing and searching of all e-pubs in your app, this could be part of the cross-platform part. If the epub reader contains a catalogue of downloaded/transferred epubs, the database including its access methods could probably be cross-platform as well (at least partially).

However, the presentation layer, i.e., the user interface, will probably have to be platform-specific. The best case scenario is that you can come up with an intermediate UI description language that can be automatically translated into Android / iPhone user interfaces. That is a daunting task however, and it's probably not even worth trying if you don't want to create many cross-platform apps.

成熟稳重的好男人 2024-09-24 07:11:34

我发现的唯一的 C/C++ 开发环境是 MoSync。

The only C/C++ development environment i found was MoSync.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文