diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/c/view.rst | 11 | ||||
-rw-r--r-- | doc/deployment.rst | 15 | ||||
-rw-r--r-- | doc/summary.rst | 16 |
3 files changed, 22 insertions, 20 deletions
diff --git a/doc/c/view.rst b/doc/c/view.rst index 12f146d..016c4e3 100644 --- a/doc/c/view.rst +++ b/doc/c/view.rst @@ -28,13 +28,14 @@ For example: .. code-block:: c - const double defaultWidth = 1920.0; - const double defaultHeight = 1080.0; + const PuglSpan defaultWidth = 1920; + const PuglSpan defaultHeight = 1080; puglSetWindowTitle(view, "My Window"); - puglSetDefaultSize(view, defaultWidth, defaultHeight); - puglSetMinSize(view, defaultWidth / 4.0, defaultHeight / 4.0); - puglSetAspectRatio(view, 1, 1, 16, 9); + puglSetSizeHint(view, PUGL_DEFAULT_SIZE, 1920, 1080); + puglSetSizeHint(view, PUGL_MIN_SIZE, 640, 480); + puglSetSizeHint(view, PUGL_MIN_ASPECT, 1, 1); + puglSetSizeHint(view, PUGL_MAX_ASPECT, 16, 9); There are also several :enum:`hints <PuglViewHint>` for basic attributes that can be set: diff --git a/doc/deployment.rst b/doc/deployment.rst index 4afc51a..1e98e62 100644 --- a/doc/deployment.rst +++ b/doc/deployment.rst @@ -9,15 +9,18 @@ Building Against Pugl When Pugl is installed, pkg-config_ packages are provided that link with the core platform library and desired backend: -- ``pugl-cairo-0`` -- ``pugl-gl-0`` -- ``pugl-vulkan-0`` +.. code-block:: sh + + pkg-config --cflags --libs pugl-0 + pkg-config --cflags --libs pugl-cairo-0 + pkg-config --cflags --libs pugl-gl-0 + pkg-config --cflags --libs pugl-vulkan-0 Depending on one of these packages should be all that is necessary to use Pugl, but details on the individual libraries that are installed are available in the README. -If you are instead including the source directly in your project, -the structure is quite simple and hopefully obvious. -It is only necessary to copy the platform and backend implementations that you need. +If you are instead building directly from source, +all of the implementation files are in the ``src`` directory. +It is only necessary to build the platform and backend implementations that you need. .. _pkg-config: https://www.freedesktop.org/wiki/Software/pkg-config/ diff --git a/doc/summary.rst b/doc/summary.rst index f05515f..e9cdc62 100644 --- a/doc/summary.rst +++ b/doc/summary.rst @@ -1,21 +1,19 @@ -Pugl is an API for writing portable and embeddable GUIs. +Pugl is a library for writing portable and embeddable GUIs. Pugl is not a toolkit or framework, but a minimal portability layer that sets up a drawing context and delivers events. -Compared to other libraries, Pugl is particularly suitable for use in plugins or other loadable modules. -There is no implicit context or static data in the library, +It has no implicit context or mutable static data, so it may be statically linked and used multiple times in the same process. -Pugl has a modular design that separates the core library from graphics backends. -The core library is graphics agnostic, -it implements platform support and depends only on standard system libraries. +Pugl has a modular design with a core library and separate graphics backends. +The core library implements platform support and depends only on standard system libraries. MacOS, Windows, and X11 are currently supported as platforms. -Graphics backends are separate so that applications only depend on the API that they use. +Graphics backends are built as separate libraries, +so applications can depend only on the APIs that they use. Pugl includes graphics backends for Cairo_, OpenGL_, and Vulkan_. -It is also possible to use some other graphics API by implementing a custom backend, -or simply accessing the native platform handle for a window. +Other graphics APIs can be used by implementing a custom backend. .. _Cairo: https://www.cairographics.org/ .. _OpenGL: https://www.opengl.org/ |