diff options
author | David Robillard <d@drobilla.net> | 2020-05-16 21:18:00 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-05-16 21:18:00 +0200 |
commit | a4ac15c1ee94e3a41f2bd799f6d1779428109a76 (patch) | |
tree | 2ae131e1ea45eca3f518496fba225397159469ea /pugl | |
parent | ceded7cf5ec0e2bbd140899ea7d5169d7fc30a51 (diff) | |
download | pugl-a4ac15c1ee94e3a41f2bd799f6d1779428109a76.tar.gz pugl-a4ac15c1ee94e3a41f2bd799f6d1779428109a76.tar.bz2 pugl-a4ac15c1ee94e3a41f2bd799f6d1779428109a76.zip |
Use line comments where appropriate
Diffstat (limited to 'pugl')
-rw-r--r-- | pugl/detail/implementation.c | 2 | ||||
-rw-r--r-- | pugl/detail/implementation.h | 24 | ||||
-rw-r--r-- | pugl/detail/types.h | 32 | ||||
-rw-r--r-- | pugl/detail/win.c | 2 |
4 files changed, 30 insertions, 30 deletions
diff --git a/pugl/detail/implementation.c b/pugl/detail/implementation.c index 19e4b50..45c06c6 100644 --- a/pugl/detail/implementation.c +++ b/pugl/detail/implementation.c @@ -337,7 +337,7 @@ puglSetEventFunc(PuglView* view, PuglEventFunc eventFunc) return PUGL_SUCCESS; } -/** Return the code point for buf, or the replacement character on error. */ +/// Return the code point for buf, or the replacement character on error uint32_t puglDecodeUTF8(const uint8_t* buf) { diff --git a/pugl/detail/implementation.h b/pugl/detail/implementation.h index 8653d1d..ff97fef 100644 --- a/pugl/detail/implementation.h +++ b/pugl/detail/implementation.h @@ -30,42 +30,42 @@ PUGL_BEGIN_DECLS -/** Set `blob` to `data` with length `len`, reallocating if necessary. */ +/// Set `blob` to `data` with length `len`, reallocating if necessary void puglSetBlob(PuglBlob* dest, const void* data, size_t len); -/** Reallocate and set `*dest` to `string`. */ +/// Reallocate and set `*dest` to `string` void puglSetString(char** dest, const char* string); -/** Allocate and initialise world internals (implemented once per platform) */ +/// Allocate and initialise world internals (implemented once per platform) PuglWorldInternals* puglInitWorldInternals(PuglWorldType type, PuglWorldFlags flags); -/** Destroy and free world internals (implemented once per platform) */ +/// Destroy and free world internals (implemented once per platform) void puglFreeWorldInternals(PuglWorld* world); -/** Allocate and initialise view internals (implemented once per platform) */ +/// Allocate and initialise view internals (implemented once per platform) PuglInternals* puglInitViewInternals(void); -/** Destroy and free view internals (implemented once per platform) */ +/// Destroy and free view internals (implemented once per platform) void puglFreeViewInternals(PuglView* view); -/** Return the Unicode code point for `buf` or the replacement character. */ +/// Return the Unicode code point for `buf` or the replacement character uint32_t puglDecodeUTF8(const uint8_t* buf); -/** Dispatch an event with a simple `type` to `view`. */ +/// Dispatch an event with a simple `type` to `view` void puglDispatchSimpleEvent(PuglView* view, PuglEventType type); -/** Dispatch `event` to `view` while already in the graphics context. */ +/// Dispatch `event` to `view` while already in the graphics context void puglDispatchEventInContext(PuglView* view, const PuglEvent* event); -/** Dispatch `event` to `view`, entering graphics context if necessary. */ +/// Dispatch `event` to `view`, entering graphics context if necessary void puglDispatchEvent(PuglView* view, const PuglEvent* event); -/** Set internal (stored in view) clipboard contents. */ +/// Set internal (stored in view) clipboard contents const void* puglGetInternalClipboard(const PuglView* view, const char** type, size_t* len); -/** Set internal (stored in view) clipboard contents. */ +/// Set internal (stored in view) clipboard contents PuglStatus puglSetInternalClipboard(PuglView* view, const char* type, diff --git a/pugl/detail/types.h b/pugl/detail/types.h index ee1d83d..7b15053 100644 --- a/pugl/detail/types.h +++ b/pugl/detail/types.h @@ -37,22 +37,22 @@ # define PUGL_UNUSED(name) name #endif -/** Platform-specific world internals. */ +/// Platform-specific world internals typedef struct PuglWorldInternalsImpl PuglWorldInternals; -/** Platform-specific view internals. */ +/// Platform-specific view internals typedef struct PuglInternalsImpl PuglInternals; -/** View hints. */ +/// View hints typedef int PuglHints[PUGL_NUM_VIEW_HINTS]; -/** Blob of arbitrary data. */ +/// Blob of arbitrary data typedef struct { - void* data; //!< Dynamically allocated data - size_t len; //!< Length of data in bytes + void* data; ///< Dynamically allocated data + size_t len; ///< Length of data in bytes } PuglBlob; -/** Cross-platform view definition. */ +/// Cross-platform view definition struct PuglViewImpl { PuglWorld* world; const PuglBackend* backend; @@ -75,7 +75,7 @@ struct PuglViewImpl { bool visible; }; -/** Cross-platform world definition. */ +/// Cross-platform world definition struct PuglWorldImpl { PuglWorldInternals* impl; PuglWorldHandle handle; @@ -87,27 +87,27 @@ struct PuglWorldImpl { PuglLogLevel logLevel; }; -/** Opaque surface used by graphics backend. */ +/// Opaque surface used by graphics backend typedef void PuglSurface; -/** Graphics backend interface. */ +/// Graphics backend interface struct PuglBackendImpl { - /** Get visual information from display and setup view as necessary. */ + /// Get visual information from display and setup view as necessary PuglStatus (*configure)(PuglView*); - /** Create surface and drawing context. */ + /// Create surface and drawing context PuglStatus (*create)(PuglView*); - /** Destroy surface and drawing context. */ + /// Destroy surface and drawing context PuglStatus (*destroy)(PuglView*); - /** Enter drawing context, for drawing if expose is non-null. */ + /// Enter drawing context, for drawing if expose is non-null PuglStatus (*enter)(PuglView*, const PuglEventExpose*); - /** Leave drawing context, after drawing if expose is non-null. */ + /// Leave drawing context, after drawing if expose is non-null PuglStatus (*leave)(PuglView*, const PuglEventExpose*); - /** Return the puglGetContext() handle for the application, if any. */ + /// Return the puglGetContext() handle for the application, if any void* (*getContext)(PuglView*); }; diff --git a/pugl/detail/win.c b/pugl/detail/win.c index ae7e7fb..76df1b4 100644 --- a/pugl/detail/win.c +++ b/pugl/detail/win.c @@ -343,7 +343,7 @@ initScrollEvent(PuglEvent* event, PuglView* view, LPARAM lParam) event->scroll.dy = 0; } -/** Return the code point for buf, or the replacement character on error. */ +/// Return the code point for buf, or the replacement character on error static uint32_t puglDecodeUTF16(const wchar_t* buf, const int len) { |