Window management: Difference between revisions

m
m (syntax highlighting fixup automation)
m (→‎{{header|Wren}}: Minor tidy)
 
Line 1,743:
An embedded application so we can use the Gtk3 toolkit.
 
The following just manipulates a window created by the application itself and works fine on Ubuntu 2022.04.
<syntaxhighlight lang="ecmascriptwren">/* window_managementWindow_management.wren */
 
var GTK_WINDOW_TOPLEVEL = 0
Line 1,863:
<br>
We now embed the above script in the following C program, build and run.
<syntaxhighlight lang="c">/* gcc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 window_managementWindow_management.c -o window_managementWindow_management `pkg-config --libs gtk+-3.0` -lwren -lm */
 
#include <stdlib.h>
Line 2,095:
vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "window_managementWindow_management.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,479

edits