Skip to content

Instantly share code, notes, and snippets.

Pietro Gagliardi andlabs

Block or report user

Report or block andlabs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6009df9284ccf4a65eb91b06d98a651e
=== RUN TestInit
../test/initmain.c:35: uiInit() with non-NULL options returned bad error message:
got libui already initialized
want options parameter to uiInit() must be NULL
--- FAIL: TestInit (31.996223ms)
FAIL
=== RUN TestInit
--- PASS: TestInit (33.521426ms)
=== RUN TestQueueMain
View gist:2395972a6f630da3d22f96332eda3b97
examples/meson.build:# MESONTODO define the top-level examples target here
I would like a target 'examples' that just builds all the targets in that file, as a convenience.
Discussion related to the following TODO may make this a moot point, though if I could group build targets in one of the IDE file generators, then that would apply here too, I bet
meson.build:# MESONTODO figure out why test and examples aren't included in ninja all
I was under the impression that 'all' was different from not specifying a target at all, and that it would build everything that was marked install_with_default: false
However, given that there are a few things which are top-level targets (like Windows resource files) that isn't in my control, I might decide to just drop the whole separate targets thing entirely and have ninja build everything, and then set my CI tool to produce the binary distributions by cherrypicking things from a layout=flat meson-out/.
meson.build:# MESONTODO "cl : Command line warning D9038 : /ZI
View xgensgs
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
View gist:b7d1031a6a32ad26e171b8cd0d0c910a
lib.cpp:65:10: error: invalid operands to binary expression ('ostream' (aka 'basic_ostream<char>') and 'const std::type_info')
std::cout<<typeid(e)<<"\n"<<typeid(eofError *)<<"\n";
~~~~~~~~~^ ~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:207:20: note: candidate function not viable: no known conversion from 'const std::type_info' to 'const void *' for 1st argument; take the address of the argument with &
basic_ostream& operator<<(const void* __p);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:191:20: note: candidate function not viable: no known conversion from 'const std::type_info' to 'std::__1::basic_ostream<char> &(*)(std::__1::basic_ostream<char> &)' for 1st argument
basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&));
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/
View uipriv_darwin.h
// 6 january 2015
// note: as of OS X Sierra, the -mmacosx-version-min compiler options governs deprecation warnings; keep these around anyway just in case
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_8
#define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_8
#import <Cocoa/Cocoa.h>
#import <dlfcn.h> // see future.m
#import "../ui.h"
#import "../ui_darwin.h"
#import "../common/uipriv.h"
View uipriv_darwin.h
// 6 january 2015
// note: as of OS X Sierra, the -mmacosx-version-min compiler options governs deprecation warnings; keep these around anyway just in case
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_8
#define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_8
#import <Cocoa/Cocoa.h>
#import <dlfcn.h> // see future.m
#import "../ui.h"
#import "../ui_darwin.h"
#import "../common/uipriv.h"
View gist:de72a50a3ce3b2db4385d983c804f547
This file has been truncated, but you can view the full file.
# 1 "E:/github.com/andlabs/libui/windows/utf16.cpp"
# 1 "E:\\github.com\\andlabs\\libui\\build//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "E:/github.com/andlabs/libui/windows/utf16.cpp"
# 1 "E:/github.com/andlabs/libui/windows/uipriv_windows.hpp" 1
# 1 "E:/github.com/andlabs/libui/windows/winapi.hpp" 1
View gist:71aa125d2afbca22ef94aefa4f2bf11f
/C/msys64/mingw64/bin/cmake.exe -H/E/github.com/andlabs/libui -B/E/github.com/andlabs/libui/build --check-build-system CMakeFiles/Makefile.cmake 0
/C/msys64/mingw64/bin/cmake.exe -E cmake_progress_start /E/github.com/andlabs/libui/build/CMakeFiles /E/github.com/andlabs/libui/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/e/github.com/andlabs/libui/build'
make -f CMakeFiles/libui.dir/build.make CMakeFiles/libui.dir/depend
make[2]: Entering directory '/e/github.com/andlabs/libui/build'
/C/msys64/mingw64/bin/cmake.exe -E cmake_depends "MSYS Makefiles" /E/github.com/andlabs/libui /E/github.com/andlabs/libui /E/github.com/andlabs/libui/build /E/github.com/andlabs/libui/build /E/github.com/andlabs/libui/build/CMakeFiles/libui.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/e/github.com/andlabs/libui/build'
make -f CMakeFiles/libui.dir/build.make CMakeFiles/libui.dir/build
make[2]: Entering directory '/e/github.com/andlabs/libui/build'
View attrstr.cpp
// 12 february 2017
#include "uipriv_windows.hpp"
#include "attrstr.hpp"
// TODO this whole file needs cleanup
// we need to collect all the background blocks and add them all at once
// TODO contextual alternates override ligatures?
// TODO rename this struct to something that isn't exclusively foreach-ing?
struct foreachParams {
View test.swift
// 8 january 2017
import CoreFoundation
import CoreGraphics
import CoreText
let our_CGFLOAT_MAX: CGFloat = CGFloat.greatestFiniteMagnitude
func iterative() {
var s = "This is a test string."
for _ in 0..<10 {
You can’t perform that action at this time.