diff --git a/doc/index.html b/doc/index.html
index 54fa0b0..f403327 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -287,9 +287,6 @@
MwVulkanField_PresentQueue
-
- MwVulkanField
-
MwVulkanGetField
@@ -311,14 +308,14 @@
-enum MwDIRECTION;
+enum MwDIRECTION;
-
Direction enumeration.
-enum MwORIENTATION;
+enum MwORIENTATION;
-
Orientation.
@@ -332,7 +329,7 @@
-#define MwDispatch(x, y)
+#define MwDispatch(x, y)
-
Dispatches the handler of widget class.
@@ -354,7 +351,7 @@
-#define MwDispatch2(x, y)
+#define MwDispatch2(x, y)
-
Dispatches the handler of widget class.
@@ -382,15 +379,15 @@
-MWDECL MwWidget MwCreateWidget (
+MWDECL MwWidget MwCreateWidget (
MwClass widget_class,
- const char* name,
+ const char* name,
MwWidget parent,
- int x,
- int y,
- unsigned int width,
- unsigned int height
-);
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height
+);
-
Creates a widget.
@@ -445,16 +442,16 @@
-MWDECL MwWidget MwVaCreateWidget (
+MWDECL MwWidget MwVaCreateWidget (
MwClass widget_class,
- const char* name,
+ const char* name,
MwWidget parent,
- int x,
- int y,
- unsigned int width,
- unsigned int height,
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height,
...
-);
+);
-
Creates a widget.
@@ -515,16 +512,16 @@
-MWDECL MwWidget MwVaListCreateWidget (
+MWDECL MwWidget MwVaListCreateWidget (
MwClass widget_class,
- const char* name,
+ const char* name,
MwWidget parent,
- int x,
- int y,
- unsigned int width,
- unsigned int height,
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height,
va_list va
-);
+);
-
Creates a widget.
@@ -585,9 +582,9 @@
-MWDECL void MwDestroyWidget (
+MWDECL void MwDestroyWidget (
MwWidget handle
-);
+);
-
Destroys the widget and its child widgets.
@@ -600,9 +597,9 @@
-MWDECL void MwLoop (
+MWDECL void MwLoop (
MwWidget handle
-);
+);
-
Runs the main loop.
@@ -615,9 +612,9 @@
-MWDECL void MwStep (
+MWDECL void MwStep (
MwWidget handle
-);
+);
-
Runs the single step.
@@ -630,9 +627,9 @@
-MWDECL int MwPending (
+MWDECL int MwPending (
MwWidget handle
-);
+);
-
Check if any event is pending.
@@ -651,11 +648,11 @@
-MWDECL void MwSetInteger (
+MWDECL void MwSetInteger (
MwWidget handle,
- const char* key,
- int n
-);
+ const char* key,
+ int n
+);
-
Sets an integer property.
@@ -680,11 +677,11 @@
-MWDECL void MwSetText (
+MWDECL void MwSetText (
MwWidget handle,
- const char* key,
- const char* value
-);
+ const char* key,
+ const char* value
+);
-
Sets a text property.
@@ -709,11 +706,11 @@
-MWDECL void MwSetVoid (
+MWDECL void MwSetVoid (
MwWidget handle,
- const char* key,
- void* value
-);
+ const char* key,
+ void* value
+);
-
Sets a void pointer property.
@@ -738,10 +735,10 @@
-MWDECL int MwGetInteger (
+MWDECL int MwGetInteger (
MwWidget handle,
- const char* key
-);
+ const char* key
+);
-
Gets the integer property.
@@ -766,10 +763,10 @@
-MWDECL const char* MwGetText (
+MWDECL const char* MwGetText (
MwWidget handle,
- const char* key
-);
+ const char* key
+);
-
Gets the text property.
@@ -794,10 +791,10 @@
-MWDECL void* MwGetVoid (
+MWDECL void* MwGetVoid (
MwWidget handle,
- const char* key
-);
+ const char* key
+);
-
Gets the void pointer property.
@@ -822,9 +819,9 @@
-MWDECL void MwSetDefault (
+MWDECL void MwSetDefault (
MwWidget handle
-);
+);
-
Sets the default property.
@@ -840,10 +837,10 @@
-MWDECL void MwVaApply (
+MWDECL void MwVaApply (
MwWidget handle,
...
-);
+);
-
Sets the properties.
@@ -862,10 +859,10 @@
-MWDECL void MwVaListApply (
+MWDECL void MwVaListApply (
MwWidget handle,
va_list va
-);
+);
-
Sets properties.
@@ -884,12 +881,12 @@
-MWDECL void MwAddUserHandler (
+MWDECL void MwAddUserHandler (
MwWidget handle,
- const char* key,
+ const char* key,
MwUserHandler handler,
- void* user_data
-);
+ void* user_data
+);
-
Sets a user handler.
@@ -920,11 +917,11 @@
-MWDECL void MwDispatchUserHandler (
+MWDECL void MwDispatchUserHandler (
MwWidget handle,
- const char* key,
- void* handler_data
-);
+ const char* key,
+ void* handler_data
+);
-
Dispatches the user handler.
@@ -949,10 +946,10 @@
-MWDECL void MwSetErrorHandler (
+MWDECL void MwSetErrorHandler (
MwErrorHandler handler,
- void* user_data
-);
+ void* user_data
+);
-
Sets an error handler.
@@ -977,10 +974,10 @@
-MWDECL void MwDispatchError (
- int code,
- const char* message
-);
+MWDECL void MwDispatchError (
+ int code,
+ const char* message
+);
-
Dispatches the error handler.
@@ -999,10 +996,10 @@
-MWDECL void MwGetBeforeStep (
+MWDECL void MwGetBeforeStep (
MwWidget handle,
jmp_buf* jmpbuf
-);
+);
-
Gets the before_step of widget.
@@ -1021,9 +1018,9 @@
-MWDECL void MwForceRender (
+MWDECL void MwForceRender (
MwWidget handle
-);
+);
-
Forcefully makes widget render.
@@ -1043,21 +1040,21 @@
-MWDECL const char* MwDefaultBackground;
+MWDECL const char* MwDefaultBackground;
-
Default background color.
-MWDECL const char* MwDefaultForeground;
+MWDECL const char* MwDefaultForeground;
-
Default foreground color.
-MWDECL const int MwDefaultBorderWidth;
+MWDECL const int MwDefaultBorderWidth;
-
Default border width.
@@ -1071,10 +1068,10 @@
-MWDECL MwLLColor MwParseColor (
+MWDECL MwLLColor MwParseColor (
MwWidget handle,
- const char* text
-);
+ const char* text
+);
-
Parses a color text.
@@ -1099,13 +1096,13 @@
-MWDECL MwLLColor MwLightenColor (
+MWDECL MwLLColor MwLightenColor (
MwWidget handle,
MwLLColor color,
- int r,
- int g,
- int b
-);
+ int r,
+ int g,
+ int b
+);
-
Lighten a color.
@@ -1148,11 +1145,11 @@
-MWDECL void MwDrawRect (
+MWDECL void MwDrawRect (
MwWidget handle,
MwRect* rect,
MwLLColor color
-);
+);
-
Draws a filled rectangle.
@@ -1177,12 +1174,12 @@
-MWDECL void MwDrawFrame (
+MWDECL void MwDrawFrame (
MwWidget handle,
MwRect* rect,
MwLLColor color,
- int invert
-);
+ int invert
+);
-
Draws a frame.
@@ -1216,13 +1213,13 @@
-MWDECL void MwDrawTriangle (
+MWDECL void MwDrawTriangle (
MwWidget handle,
MwRect* rect,
MwLLColor color,
- int invert,
- int direction
-);
+ int invert,
+ int direction
+);
-
Draws a triangle.
@@ -1253,13 +1250,13 @@
-MWDECL void MwDrawFrameEx (
+MWDECL void MwDrawFrameEx (
MwWidget handle,
MwRect* rect,
MwLLColor color,
- int invert,
- int border
-);
+ int invert,
+ int border
+);
-
Draws a frame with specified border width.
@@ -1299,13 +1296,13 @@
-MWDECL void MwDrawText (
+MWDECL void MwDrawText (
MwWidget handle,
MwPoint* point,
- const char* text,
- int bold,
+ const char* text,
+ int bold,
MwLLColor color
-);
+);
-
Draws a text.
@@ -1342,10 +1339,10 @@
-MWDECL MwLLPixmap MwLoadImage (
+MWDECL MwLLPixmap MwLoadImage (
MwWidget handle,
- const char* path
-);
+ const char* path
+);
-
Creates a pixmap from image.
@@ -1370,10 +1367,10 @@
-MWDECL int MwTextWidth (
+MWDECL int MwTextWidth (
MwWidget handle,
- const char* text
-);
+ const char* text
+);
-
Calculates a text width.
@@ -1398,10 +1395,10 @@
-MWDECL int MwTextHeight (
+MWDECL int MwTextHeight (
MwWidget handle,
- const char* text
-);
+ const char* text
+);
-
Calculates a text height.
@@ -1433,28 +1430,28 @@
-typedef enum MwErrorEnum_T;
+typedef enum MwErrorEnum_T;
-
Error code enumeration.
- MwEsuccess = 0
+ MwEsuccess = 0
-
No error.
- MwEerror
+ MwEerror
-
There was an error.
-MWDECL const char* MwGetLastError();
+MWDECL const char* MwGetLastError();
-
Get the last error.
@@ -1468,14 +1465,14 @@
-MWDECL MwFont MwFontData[];
+MWDECL MwFont MwFontData[];
-
Default font data.
-MWDECL MwFont MwBoldFontData[];
+MWDECL MwFont MwBoldFontData[];
-
Default bold font data.
@@ -1527,7 +1524,7 @@
-MWDECL MwClass MwButtonClass;
+MWDECL MwClass MwButtonClass;
-
Button widget class.
@@ -1541,7 +1538,7 @@
-MWDECL MwClass MwFrameClass;
+MWDECL MwClass MwFrameClass;
-
Frame widget class.
@@ -1555,7 +1552,7 @@
-MWDECL MwClass MwImageClass;
+MWDECL MwClass MwImageClass;
-
Image widget class.
@@ -1569,18 +1566,18 @@
-
+
-
Menu widget class.
-
+ const char* name
+);
-
Adds a menu.
@@ -1618,16 +1615,16 @@
-MWDECL MwClass MwOpenGLClass;
+MWDECL MwClass MwOpenGLClass;
-
OpenGL widget class.
-MWDECL void MwOpenGLMakeCurrent (
+MWDECL void MwOpenGLMakeCurrent (
MwWidget handle
-);
+);
-
Make a widget current OpenGL context.
@@ -1640,10 +1637,10 @@
-MWDECL void* MwOpenGLGetProcAddress (
+MWDECL void* MwOpenGLGetProcAddress (
MwWidget handle,
- const char* name
-);
+ const char* name
+);
-
Get a procedure from OpenGL.
@@ -1668,9 +1665,9 @@
-MWDECL void MwOpenGLSwapBuffer (
+MWDECL void MwOpenGLSwapBuffer (
MwWidget handle
-);
+);
-
Swaps the buffer of OpenGL context.
@@ -1690,16 +1687,16 @@
-MWDECL MwClass MwScrollBarClass;
+MWDECL MwClass MwScrollBarClass;
-
ScrollBar widget class.
-MWDECL int MwScrollBarGetVisibleLength (
+MWDECL int MwScrollBarGetVisibleLength (
MwWidget handle
-);
+);
-
Calculates a visible length of scrollbar.
@@ -1725,7 +1722,7 @@
-
+
-
SubMenu widget class.
@@ -1742,16 +1739,16 @@
-MWDECL MwClass MwVulkanClass;
+MWDECL MwClass MwVulkanClass;
-
Vulkan widget class.
-MWDECL void MwVulkanEnableExtension (
- const char* ext_name
-);
+MWDECL void MwVulkanEnableExtension (
+ const char* ext_name
+);
-
Add an extension to the list of extensions to enable prior to initialization.
@@ -1761,9 +1758,9 @@
-MWDECL void MwVulkanEnableLayer (
- const char* ext_name
-);
+MWDECL void MwVulkanEnableLayer (
+ const char* ext_name
+);
-
Add an layer to the list of layers to enable prior to initialization.
@@ -1773,37 +1770,37 @@
-typedef struct MwVulkanConfig_T;
+typedef struct MwVulkanConfig_T;
-
Configuration options that can be passed to setup Vulkan before a widget is created.
- uint32_t api_version;
+ uint32_t api_version;
-
Vulkan API version (default: VK_API_VERSION_1_0).
- uint32_t vk_version;
+ uint32_t vk_version;
-
Vulkan version (default: VK_VERSION_1_0).
- VkBool32 validation_layers;
+ VkBool32 validation_layers;
-
Whether or not to enable validation layers (default: false).
-MWDECL void MwVulkanConfigure (
+MWDECL void MwVulkanConfigure (
MwVulkanConfig cfg
-);
+);
-
Configure Vulkan prior to initializing the widget.
@@ -1813,81 +1810,74 @@
-typedef enum MwVulkanField_T;
+typedef enum MwVulkanField_T;
-
Field that can be gotten from Vulkan.
- MwVulkanField_GetInstanceProcAddr = 0
+ MwVulkanField_GetInstanceProcAddr = 0
-
The address of the vulkan widget's vkGetInstanceProcAddr function (PFN_vkGetInstanceProcAddr).
- MwVulkanField_Instance
+ MwVulkanField_Instance
-
The address of the vulkan widget's instance (VkInstance).
- MwVulkanField_Surface
+ MwVulkanField_Surface
-
The address of the vulkan widget's surface (VkSurfaceKHR).
- MwVulkanField_PhysicalDevice
+ MwVulkanField_PhysicalDevice
-
The address of the vulkan widget's physical device (VkPhysicalDevice).
- MwVulkanField_LogicalDevice
+ MwVulkanField_LogicalDevice
-
The address of the vulkan widget's logical device (VkDevice).
- MwVulkanField_GraphicsQueueIndex
+ MwVulkanField_GraphicsQueueIndex
-
The address of the index that the vulkan widget uses for the graphics queue (uint32_t *).
- MwVulkanField_PresentQueueIndex
+ MwVulkanField_PresentQueueIndex
-
The address of the index that the vulkan widget uses for the present queue (uint32_t *).
- MwVulkanField_PresentQueue
+ MwVulkanField_PresentQueue
-
The address of the vulkan widget's graphics queue (VkQueue).
-} MwVulkanField;
-
--
- The address of the vulkan widget's present queue (VkQueue).
-
-
-
-MWDECL void* MwVulkanGetField (
+MWDECL void* MwVulkanGetField (
MwWidget handle,
MwVulkanField field,
MwErrorEnum* out
-);
+);
-
Function for getting a field from within Vulkan.
@@ -1897,9 +1887,9 @@
-MWDECL VkBool32 MwVulkanSupported (
- void
-);
+MWDECL VkBool32 MwVulkanSupported (
+ void
+);
-
Return whether Vulkan is installed on the target platform.
@@ -1913,7 +1903,7 @@
-MWDECL MwClass MwWindowClass;
+MWDECL MwClass MwWindowClass;
-
Window widget class.
diff --git a/include/Mw/Widget/Vulkan.h b/include/Mw/Widget/Vulkan.h
index 851be64..8591475 100644
--- a/include/Mw/Widget/Vulkan.h
+++ b/include/Mw/Widget/Vulkan.h
@@ -106,9 +106,6 @@ typedef enum MwVulkanField_T {
* %brief The address of the vulkan widget's graphics queue (VkQueue)
*/
MwVulkanField_PresentQueue,
- /*!
- * %brief The address of the vulkan widget's present queue (VkQueue)
- */
} MwVulkanField;
/*!
diff --git a/tools/doc.pl b/tools/doc.pl
index 4ef4f95..bd4c766 100755
--- a/tools/doc.pl
+++ b/tools/doc.pl
@@ -52,6 +52,35 @@ sub replace_special {
return $ret;
}
+sub highlight {
+ my $txt = "";
+ my $app = 0;
+
+ open(DOCPL, ">", "/tmp/docpl");
+ print(DOCPL $_[0] . "\n");
+ close(DOCPL);
+
+ open(DOCIN, "cat /tmp/docpl | enscript -q -whtml --color -Ec -o - |");
+ while (my $l = ) {
+ $l =~ s/\r?\n$//g;
+ if ($l =~ /\
/i) {
+ $app = 1;
+ }
+ elsif ($l =~ /\<\/pre\>/i) {
+ $app = 0;
+ }
+ elsif ($app) {
+ $txt = $txt . "\n" . $l;
+ }
+ }
+ close(DOCIN);
+
+ $txt =~ s/[\r\n]+$//g;
+ $txt =~ s/^[\r\n]+//g;
+
+ return $txt;
+}
+
sub scan_dir {
my ($first, $path) = @_;
$path =~ s/\/+$//g;
@@ -135,7 +164,7 @@ sub scan_dir {
push(@{ $files_sections{ replace_special($current) } },
$sl);
- out("$l
");
+ out("" . highlight($l) . "
");
}
out("");
out("<$para>");
@@ -145,7 +174,10 @@ sub scan_dir {
foreach my $note (@notes) {
if (defined($kv{$note})) {
out("- ");
- out("
 | " . sentence($kv{$note}) . " |
");
+ out(
+"  | "
+ . sentence($kv{$note})
+ . " |
");
out(" ");
}
}