repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
dmuino/spectatord
spectator/meter.h
#pragma once #include "absl/time/clock.h" #include "id.h" #include "measurement.h" #include <atomic> #include <chrono> #include <vector> namespace spectator { struct Meter { public: explicit Meter(Id id) : id_{std::move(id)}, last_updated_{absl::GetCurrentTimeNanos()} {} [[nodiscard]] const Id& MeterId() ...
dmuino/spectatord
spectator/logger.h
<filename>spectator/logger.h #pragma once #include <spdlog/spdlog.h> namespace spectator { class LogManager { public: LogManager() noexcept; std::shared_ptr<spdlog::logger> Logger() noexcept; private: std::shared_ptr<spdlog::logger> logger_; }; LogManager& log_manager() noexcept; inline std::shared_ptr<sp...
pekkarr/processx
src/create-time.c
#ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include <Rinternals.h> #include "processx.h" #ifdef _WIN32 #include <windows.h> /* FILETIME origin is January 1, 1601 (UTC). See https://msdn.microsoft.com/en-us/9baf8a0e-59e3-4fbd-9616-2ec9161520d1 Unix origin is January 1, 1970. The difference is 116444...
pekkarr/processx
src/poll.c
#include "processx.h" SEXP processx_poll(SEXP statuses, SEXP types, SEXP ms) { int cms = INTEGER(ms)[0]; int i, j, num_total = LENGTH(statuses); processx_pollable_t *pollables; SEXP result; int num_proc = 0, num_poll; for (i = 0; i < num_total; i++) if (INTEGER(types)[i] == 1) num_proc++; num_poll = nu...
pekkarr/processx
src/supervisor/windows.c
#ifdef __INTEL_COMPILER #define _BSD_SOURCE 1 #define _POSIX_C_SOURCE 200809L #endif #include <stdio.h> #include <stdbool.h> #include "windows.h" #include "utils.h" #define MIN(a,b) ((a<b)?a:b) #define MAX(a,b) ((a>b)?a:b) int getppid() { int pid = GetCurrentProcessId(); HANDLE hProcessSnap = CreateToolh...
pekkarr/processx
src/base64.c
<filename>src/base64.c #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include <Rinternals.h> #include <string.h> #define BASE64_ENCODE_OUT_SIZE(s) ((unsigned int)((((s) + 2) / 3) * 4)) #define BASE64_DECODE_OUT_SIZE(s) ((unsigned int)(((s) / 4) * 3)) #define BASE64_PAD '=' /* BASE 64 encode table */ static cons...
pekkarr/processx
src/processx-connection.h
#ifndef PROCESSX_CONNECTION_H #define PROCESSX_CONNECTION_H #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #ifdef __INTEL_COMPILER #define _BSD_SOURCE 1 #define _POSIX_C_SOURCE 200809L #endif #ifdef _WIN32 #ifndef FD_SETSIZE #define FD_SETSIZE 32767 #endif #include <winsock2.h> #include <windows.h> #else #includ...
pekkarr/processx
src/win/processx-win.h
<reponame>pekkarr/processx<gh_stars>100-1000 #ifndef R_PROCESSX_WIN_H #define R_PROCESSX_WIN_H #include <windows.h> typedef struct processx_handle_s { int exitcode; int collected; /* Whether exit code was collected already */ HANDLE hProcess; DWORD dwProcessId; BYTE *child_stdio_buffer; HANDLE waitObje...
pekkarr/processx
src/supervisor/windows.h
#ifndef R_PROCESSX_SUPERVISOR_WINDOWS_H #define R_PROCESSX_SUPERVISOR_WINDOWS_H #include <windows.h> #include <tlhelp32.h> #include <process.h> // Constants ------------------------------------------------------------------ #define WIN_INPUT_BUF_LEN 1024 // Functions ----------------------------------------------...
pekkarr/processx
src/init.c
<gh_stars>100-1000 #include "processx.h" #include "cleancall.h" #include <R_ext/Rdynload.h> #include <R.h> void R_init_processx_win(); void R_init_processx_unix(); SEXP processx__unload_cleanup(); SEXP run_testthat_tests(); SEXP processx__echo_on(); SEXP processx__echo_off(); SEXP processx__set_boot_time(SEXP); sta...
pekkarr/processx
src/unix/childlist.c
<reponame>pekkarr/processx #include "../processx.h" processx__child_list_t child_list_head = { 0, 0, 0 }; processx__child_list_t *child_list = &child_list_head; processx__child_list_t child_free_list_head = { 0, 0, 0 }; processx__child_list_t *child_free_list = &child_free_list_head; void processx__freelist_add(proc...
pekkarr/processx
src/tools/pxu.c
#ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include <windows.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <fcntl.h> #include <stdlib.h> #include <errno.h> #include <stdlib.h> #include <io.h> void usage() { fwprintf(stderr, L"Usage: px [command arg] [command arg] ...\n\n"); fwprin...
pekkarr/processx
src/unix/processx-unix.h
#ifndef R_PROCESSX_UNIX_H #define R_PROCESSX_UNIX_H #include <unistd.h> #include <sys/types.h> #include <sys/signal.h> #include <pthread.h> # ifndef O_CLOEXEC # define O_CLOEXEC 02000000 # endif # ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC O_CLOEXEC # endif typedef struct processx_handle_s { int exitcode; int ...
pekkarr/processx
src/processx.h
#ifndef PROCESSX_H #define PROCESSX_H #ifdef __cplusplus extern "C" { #endif #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #ifdef __INTEL_COMPILER #define _BSD_SOURCE 1 #define _POSIX_C_SOURCE 200809L #endif #include "processx-connection.h" #include "errors.h" #ifdef _WIN32 #include <windows.h> #else #include...
pekkarr/processx
src/supervisor/supervisor.c
<filename>src/supervisor/supervisor.c // This supervisor program keeps track of a process (normally the parent // process) and receives process IDs (called children) on standard input. If // the supervisor process receives a SIGINT (Ctrl-C) or SIGTERM, or if it // detects that the parent process has died, it will kill ...
pekkarr/processx
src/supervisor/utils.h
<reponame>pekkarr/processx<filename>src/supervisor/utils.h<gh_stars>100-1000 #ifndef R_PROCESSX_SUPERVISOR_UTILS_H #define R_PROCESSX_SUPERVISOR_UTILS_H #include <stdbool.h> extern bool verbose_mode; void verbose_printf(const char *format, ...); int remove_element(int* ar, int len, int idx) ; bool array_contains...
pekkarr/processx
src/tools/interrupt.c
<gh_stars>100-1000 #include <stdio.h> #include <string.h> #include <windows.h> int main(int argc, const char **argv) { int ctrlbreak = 1; int pid; int ret; BOOL bret; if (argc == 1) return 1; ret = sscanf(argv[1], "%d", &pid); if (ret != 1) return 1; printf("Pid: %d\n", pid); if (argc == 3 && !st...
pekkarr/processx
src/unix/named_pipe.c
// On non-windows platforms, we still need the C interfaces, but they simply // give errors. #ifndef _WIN32 #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include <Rdefines.h> #include "../errors.h" SEXP processx_is_named_pipe_open(SEXP pipe_ext) { R_THROW_ERROR("processx_is_named_pipe_open only valid on Wi...
pekkarr/processx
src/unix/utils.c
#include "../processx.h" #include <termios.h> #include <sys/ioctl.h> char *processx__tmp_string(SEXP str, int i) { const char *ptr = CHAR(STRING_ELT(str, i)); char *cstr = R_alloc(1, (int) strlen(ptr) + 1); strcpy(cstr, ptr); return cstr; } char **processx__tmp_character(SEXP chr) { size_t i, n = LENGTH(c...
pekkarr/processx
src/processx-vector.c
<reponame>pekkarr/processx<filename>src/processx-vector.c #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include <R.h> #include "processx-types.h" #include "errors.h" void processx_vector_init(processx_vector_t *v, size_t size, size_t alloc_size) { if (alloc_size < size) alloc_size = size; if (alloc_size == 0...
pekkarr/processx
src/processx-types.h
<reponame>pekkarr/processx<gh_stars>100-1000 #ifndef PROCESSX_TYPES_H #define PROCESSX_TYPES_H #ifdef _WIN32 #include <windows.h> typedef DWORD pid_t; #else #include <signal.h> #include <unistd.h> #include <sys/types.h> #endif typedef struct { pid_t *stor_begin; pid_t *stor_end; pid_t *end; } processx_vector_t...
pekkarr/processx
src/win/named_pipe.c
<gh_stars>100-1000 #ifdef _WIN32 #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <Rdefines.h> #include <windows.h> #include "../errors.h" SEXP processx_is_named_pipe_open(SEXP pipe_ext) { if (pipe_ext == R_NilValue) R_THROW_ERROR("Not a named pipe handle."); // This function c...
pekkarr/processx
src/win/utils.c
<gh_stars>100-1000 #include "../processx.h" SEXP processx_disable_crash_dialog() { /* TODO */ return R_NilValue; } SEXP processx__echo_on() { R_THROW_ERROR("Only implemented on Unix"); return R_NilValue; } SEXP processx__echo_off() { R_THROW_ERROR("Only implemented on Unix"); return R_NilValue; } SEXP ...
pekkarr/processx
src/supervisor/utils.c
#ifdef __INTEL_COMPILER #define _BSD_SOURCE 1 #define _POSIX_C_SOURCE 200809L #endif #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include "utils.h" bool verbose_mode = false; void verbose_printf(const char *format, ...) { va_list args; va_start(args, format); if (verbose_mode) { ...
pekkarr/processx
src/unix/connection.c
<reponame>pekkarr/processx #include "../processx.h" #include <sys/types.h> #include <sys/uio.h> #include <unistd.h> processx_connection_t* processx__create_connection( int fd, const char *membername, SEXP private, const char *encoding) { processx_connection_t *con; SEXP res; con = processx_c_connectio...
pekkarr/processx
src/win/processx-stdio.h
<gh_stars>100-1000 #include <R.h> #include "../processx.h" /* * The `child_stdio_buffer` buffer has the following layout: * int number_of_fds * unsigned char crt_flags[number_of_fds] * HANDLE os_handle[number_of_fds] */ #define CHILD_STDIO_SIZE(count) \ (sizeof(int) + ...
pekkarr/processx
src/processx-connection.c
<reponame>pekkarr/processx #include "processx-connection.h" #include <string.h> #include <stdlib.h> #include <errno.h> #include <sys/types.h> #include <unistd.h> #ifndef _WIN32 #include <sys/uio.h> #include <poll.h> #else #include <io.h> #endif #include "processx.h" #ifdef _WIN32 #include "win/processx-win.h" #els...
pekkarr/processx
src/win/thread.c
#include "../processx.h" HANDLE processx__connection_iocp = NULL; HANDLE processx__get_default_iocp() { if (! processx__connection_iocp) { processx__connection_iocp = CreateIoCompletionPort( /* FileHandle = */ INVALID_HANDLE_VALUE, /* ExistingCompletionPort = */ NULL, /* Complet...
pekkarr/processx
src/tools/px.c
#ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #if defined __INTEL_COMPILER #define _BSD_SOURCE 1 #define _POSIX_C_SOURCE 200809L #endif #include <unistd.h> #include <stdio.h> #include <string.h> #include <fcntl.h> #include <stdlib.h> #include <errno.h> #include <stdlib.h> void usage() { fprintf(stderr, "Usage...
kr15h/nobelApp
src/StrobeElements.h
#pragma once #include "ofMain.h" #include "Constants.h" #include "Settings.h" namespace bmbf{ namespace nobel{ struct StrobeRect{ ofRectangle rect; ofColor color; float alpha; float decay; }; class StrobeElements{ public: StrobeElements(); void setup(); void update(); void draw(); void triggerRan...
kr15h/nobelApp
src/LaureateDisplay.h
#pragma once #include "ofMain.h" #include "Settings.h" #include "Laureate.h" #include "Fonts.h" #include "StrobeElements.h" namespace bmbf{ namespace nobel{ enum DisplayState{ SHOWING, STROBING }; class LaureateDisplay{ public: LaureateDisplay(Data data, shared_ptr<Fonts> fonts); void update(); void draw...
kr15h/nobelApp
src/MappingSource.h
<filename>src/MappingSource.h #pragma once #include "ofMain.h" #include "FboSource.h" #include "Constants.h" #include "Settings.h" #include "Fonts.h" #include "Laureate.h" #include "LaureateDisplay.h" #include "StrobeElements.h" class MappingSource : public ofx::piMapper::FboSource { public: MappingSource(); ...
kr15h/nobelApp
src/Constants.h
<reponame>kr15h/nobelApp #pragma once #define APP_WIDTH 1700 #define APP_HEIGHT 300 #define BIG_FONT_SIZE 75 #define SMALL_FONT_SIZE 25 #define APP_MARGIN 40 #define XML_SETTINGS_FILENAME "laureates.xml" #define REGULAR_FONT_PATH "Libre_Baskerville/LibreBaskerville-Regular.ttf" #define BOLD_FONT_PATH "Libre_Basker...
kr15h/nobelApp
src/Fonts.h
#pragma once #include "ofMain.h" #include "ofxTrueTypeFontUC.h" #include "Constants.h" namespace bmbf{ namespace nobel{ class Fonts{ public: void load( string bigFontPath, int bigFontSize, string smallFontPath, int smallFontSize); vector<ofPath> getBigAsPaths(string text = "A"); vector<ofPath> g...
kr15h/nobelApp
src/Laureate.h
#pragma once #include "Constants.h" #include "ofMain.h" #include "Fonts.h" namespace bmbf{ namespace nobel{ struct LaureateState{ vector<ofPath> firstPaths; vector<ofPath> lastPaths; vector<ofPath> fieldAndYearPaths; vector<ofPolyline> firstPolylines; }; class Laureate{ public: Laureate( string first, ...
kr15h/nobelApp
src/Settings.h
<reponame>kr15h/nobelApp #pragma once #include "ofMain.h" #include "ofxXmlSettings.h" #include "Constants.h" #include "Laureate.h" #include "Fonts.h" namespace bmbf{ namespace nobel{ struct Data{ string title; vector<Laureate *> laureates; }; class Settings{ public: enum Field{ CHEMISTRY, ECONOMICS, L...
kr15h/nobelApp
src/BackgroundSource.h
#pragma once #include "ofMain.h" #include "FboSource.h" #include "Constants.h" #include "Settings.h" #include "Particle.h" namespace bmbf{ namespace nobel{ class BackgroundSource : public ofx::piMapper::FboSource { public: BackgroundSource(); void setup(); void update(); void draw(); void loadI...
kr15h/nobelApp
src/Letter.h
<gh_stars>1-10 #pragma once #include "ofMain.h" #include "ofxTrueTypeFontUC.h" #include "Fonts.h" namespace bmbf{ namespace nobel{ class Letter{ public: void setup(shared_ptr<Fonts> fonts); void update(); void draw(); private: shared_ptr<Fonts> _fonts; string _testString; vector<ofPath> _stringPa...
kr15h/nobelApp
src/ofApp.h
<filename>src/ofApp.h #pragma once #include "ofMain.h" #include "ofxXmlSettings.h" #include "ofxTrueTypeFontUC.h" #include "ofxPiMapper.h" #include "Constants.h" #include "Settings.h" #include "Fonts.h" #include "Laureate.h" #include "LaureateDisplay.h" #include "StrobeElements.h" #include "MappingSource.h" #includ...
kr15h/nobelApp
src/Particle.h
// We use this for the BackgroundSource #pragma once #include "ofMain.h" #include "Constants.h" #include "Settings.h" namespace bmbf{ namespace nobel{ class Particle{ public: Particle(); void setup(); void update(); void draw(); void setSettings(shared_ptr<Settings> s); void setImages( shared_...
fnguler/blackjack
blackjack.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #define cnumber 52 #define pit 104 int deck1[cnumber] = {1,2,3,4,5,6,7,8,9,10,11,12,13, //club 14,15,16,17,18,19,20,21,22,23,24,25,26, //spade 27,28,29,30,31,32,33,34,35,36,37,38,39, //diamond 40,41,42,43,44,45,46,47,48,49,50,51,52}; //heart ...
Melesar/gutar-notes
src/cheatsheet.c
<gh_stars>0 #include <stdio.h> static void printNotes(); static void printTabs(); void cheatsheet() { printNotes(); printf("\n\n"); printTabs(); } void printNotes() { const int notesNum = 22; const int downNotesOffset = 7; const int notesOnBarsNum = 9; for (int i = 0; i < notesNum; i++) { int drawBarBefor...
Melesar/gutar-notes
src/main.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include <string.h> #include <signal.h> #include <getopt.h> const int NUM_NOTES = 7; const int NUM_STRINGS = 6; const unsigned int INTERVAL = 3; static volatile int keepRunning = 1; void drawFretboard(char* letters, int stringIndex, int no...
OrangeLab/hummer-cli-template
packages/cli-template-ios/template/app/ViewController.h
<filename>packages/cli-template-ios/template/app/ViewController.h // // ViewController.h // app // // Created by wangdu on 2019/6/14. // Copyright © 2019 RLab. All rights reserved. // #import <UIKit/UIKit.h> #import <Hummer/HMViewController.h> @interface ViewController : HMViewController @end
emoon/flowi
flowi/c/include/flowi/window.h
<reponame>emoon/flowi /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ...
emoon/flowi
core/c/tests/input_tests.c
<reponame>emoon/flowi #include "../src/internal.h" #include "utest.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// UTEST(Input, mouse_button_down) { struct FlGlobalState* state = fl_create(NULL); FlContext* ctx = fl_context_create(stat...
emoon/flowi
core/c/include/flowi_core/style.h
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma once #include...
emoon/flowi
core/c/include/flowi_core/idx.h
<gh_stars>1-10 #pragma once #ifndef FLI_INDEX_SIZE #define FLI_INDEX_SIZE 2 #endif #if FLI_INDEX_SIZE == 2 typedef uint16_t FlIdxSize; #elif FLI_INDEX_SIZE == 4 typedef uint32_t FlIdxSize; #else #error "Unsupported index size. Only u16 or u32 supported" #endif
emoon/flowi
flowi/c/shaders/generated/fs_texture_glsl.h
<reponame>emoon/flowi static const uint8_t fs_texture_glsl[189] = { 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s 0x5f, 0x74, 0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, // _tex............ 0x00, 0x00, 0x76,...
emoon/flowi
core/c/src/linear_allocator.c
#include "linear_allocator.h" #include "internal.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void LinearAllocator_create(LinearAllocator* self, const char* id, u8* data, int len) { self->id = id; self->start_data = data; self->...
emoon/flowi
core/c/src/image_private.h
#pragma once #include <flowi_core/image.h> #include <flowi_core/render_commands.h> #include "types.h" struct Atlas; struct FlContext; struct NSVGimage; struct NSVGrasterizer; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// typedef struct ImageP...
emoon/flowi
core/c/src/linear_allocator.h
<filename>core/c/src/linear_allocator.h #pragma once #include "types.h" struct FlAllocator; // TODO: VirtualAlloc based allocator typedef struct LinearAllocator { u8* start_data; u8* end_data; u8* current_data; struct FlAllocator* allocator; const char* id; bool allow_realloc; } LinearAllocat...
emoon/flowi
core/c/include/flowi_core/inline.h
#pragma once #if defined(__GNUC__) #define FL_INLINE static inline #elif defined(_MSC_VER) #define FL_INLINE __forceinline static #else #error "Unsupported compiler" #endif
emoon/flowi
core/c/tests/area_tests.c
<reponame>emoon/flowi #include "../src/area.h" #include "utest.h" #ifdef _WIN32 #include <malloc.h> // alloca #endif struct FlContext; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Generate a basic area #if 0 UTEST(Area, area_default) { ...
emoon/flowi
core/c/tests/style_tests.c
<gh_stars>1-10 #include <flowi_core/style.h> #include "../src/flowi.h" #include "../src/internal.h" #include "utest.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Validate that a new style has the default values UTEST(Style, default_create...
emoon/flowi
core/c/src/primitives.h
#pragma once #include <flowi_core/math_data.h> #include "command_buffer.h" #include "flowi.h" struct Font; struct FlContext; struct FlGlobalState; struct ImagePrivate; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // INTERNAL HEADER ONLY! ////...
emoon/flowi
core/c/tests/vertex_allocator_tests.c
<gh_stars>1-10 #include <assert.h> #include "../src/internal.h" #include "../src/linear_allocator.h" #include "../src/vertex_allocator.h" #include "utest.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// extern FlAllocator g_malloc_allocator; /...
emoon/flowi
core/c/tests/command_buffer_tests.c
#include "../src/command_buffer.h" #include "../src/internal.h" #include "utest.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static void* alloc_malloc(void* user_data, u64 size) { FL_UNUSED(user_data); return malloc(size); } static...
emoon/flowi
core/c/src/vertex_allocator.c
#include "vertex_allocator.h" #include <flowi_core/error.h> #include <string.h> /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// bool VertexAllocator_create(VertexAllocator* self, FlAllocator* allocator, int vertex_init...
emoon/flowi
core/c/src/font_cache.c
#include <stdint.h> #include <stdio.h> #include <freetype/freetype.h> static void draw_bitmap(uint32_t* dest, FT_Bitmap* bitmap, FT_Int x, FT_Int y, int width, int height) { FT_Int i, j, p, q; FT_Int x_max = x + bitmap->width; FT_Int y_max = y + bitmap->rows; // for simplicity, we assume that `bitmap->pixel_mo...
emoon/flowi
core/c/tests/text_tests.c
<gh_stars>1-10 #include "../src/font_private.h" #include "../src/text.h" #include "utest.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// UTEST(Text, test_utf8_decode_ascii) { u8 temp_buffer[256]; LinearAllocator alloc; LinearAlloca...
emoon/flowi
core/c/src/text.h
#pragma once #include <flowi_core/config.h> #include <flowi_core/error.h> #include <stdbool.h> #include "flowi.h" #include "render.h" #include "types.h" struct FlVertPosUvColor; struct Glyph; struct Font; struct LinearAllocator; typedef struct Utf8Result { u32* codepoints; int len; FlError error; } Utf8R...
emoon/flowi
core/c/src/area.h
#pragma once #include "types.h" #include "flowi.h" #include "render.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Areas are used for generating an area around a widget/control. // This can be the outline for a button, box, etc. // The ...
emoon/flowi
core/c/src/atlas.c
#include "atlas.h" #include <flowi_core/error.h> #include "allocator.h" #include "internal.h" #include "render.h" #include "types.h" #define PRE_ALLOC_COUNT 256 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Original code base on <NAME> fonts...
emoon/flowi
flowi/c/shaders/generated/fs_texture_r_glsl.h
<gh_stars>1-10 static const uint8_t fs_texture_r_glsl[251] = { 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s 0x5f, 0x74, 0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x00, // _tex............ 0x00, 0x00, 0x76, 0x61...
emoon/flowi
core/c/include/flowi_core/image.h
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma once #include...
emoon/flowi
core/c/include/flowi_core/config.h
<filename>core/c/include/flowi_core/config.h #pragma once // Allow usage for fopen/free/etc/functions #define FL_ALLOW_STDIO 1 // Use Freetype to generate fonts #define FL_FONTLIB_FREETYPE // Use stb_truetype to generate fonts //#define FL_FONTLIB_STBTYPE // #if !defined(FL_WCHAR_SIZE) #define FL_WCHAR unsigned sh...
emoon/flowi
core/c/src/layout_private.h
#pragma once #include <flowi_core/layout.h> #include <flowi_core/math_data.h> struct FlContext; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// typedef struct LayoutAreaPrivate { FlLayoutArea area; int id; int frame; // TODO: Fi...
emoon/flowi
core/c/src/render.h
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma once #include...
emoon/flowi
flowi/c/shaders/generated/color_fill_fs_essl.h
static const uint8_t color_fill_fs_essl[93] = { 0x46, 0x53, 0x48, 0x0b, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, // FSH....I......J. 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ..varying highp 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0...
emoon/flowi
core/c/src/flowi.h
<gh_stars>1-10 #pragma once #include <stdbool.h> #include "render.h" #include "types.h" #ifdef __cplusplus extern "C" { #endif #define FL_INDEX_SIZE 2 struct FlContext; struct FlGlobalState; struct FlRenderData; // TODO: Bunch of settings here including max memory usage etc typedef struct FlSettings { // dummy...
emoon/flowi
core/c/src/font_private.h
// Internal header only. Shouldn't be exposed to user side! #pragma once #include <flowi_core/config.h> #include <flowi_core/font.h> #include <freetype/freetype.h> #include "flowi.h" #include "render.h" #include "types.h" struct FlAllocator; struct FlGlobalState; // TODO: Investigate making memory usage smaller typ...
emoon/flowi
core/c/include/flowi_core/error.h
<reponame>emoon/flowi<gh_stars>1-10 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! ///////////////////////////////////////////////////////////////////////////////////////////////////////////...
emoon/flowi
core/c/include/flowi_core/layout.h
<gh_stars>1-10 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma...
emoon/flowi
core/c/include/flowi_core/pods.h
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma once #include...
emoon/flowi
core/c/tests/font_tests.c
<filename>core/c/tests/font_tests.c<gh_stars>1-10 #include <flowi_core/font.h> #include "../src/atlas.h" #include "../src/font_private.h" #include "../src/internal.h" #include "utest.h" struct FlContext; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////...
emoon/flowi
core/c/src/style.c
<reponame>emoon/flowi<filename>core/c/src/style.c #include <assert.h> #include <flowi_core/error.h> #include <flowi_core/manual.h> #include <flowi_core/style.h> #include <stdlib.h> #include <string.h> #include "internal.h" #include "style_internal.h" ////////////////////////////////////////////////////////////////////...
emoon/flowi
core/c/src/allocator.h
#pragma once #include <stdlib.h> #include <string.h> #include "types.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // These flags will determine what happens when typedef enum FlAllocatorError { /// After calling error_callback it will ...
emoon/flowi
core/c/src/area.c
<filename>core/c/src/area.c #include "area.h" #include <assert.h> #include <flowi_core/style.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include "internal.h" #include "render.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // /...
emoon/flowi
core/c/tests/linear_allocator_tests.c
#include <assert.h> #include "../src/internal.h" #include "../src/linear_allocator.h" #include "utest.h" extern FlAllocator g_malloc_allocator; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// static void allocator_create(LinearAllocator* alloc, ...
emoon/flowi
core/c/include/flowi_core/render_commands.h
<filename>core/c/include/flowi_core/render_commands.h /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////...
emoon/flowi
core/c/src/atlas.h
<reponame>emoon/flowi #pragma once #include "render.h" #include "types.h" struct FlAllocator; struct FlGlobalState; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // INTERNAL HEADER //////////////////////////////////////////////////////////////...
emoon/flowi
core/c/src/array.h
<filename>core/c/src/array.h #pragma once /* struct FlAllocator; typedef struct Array { struct FLAllocator* allocator; void* data; int len; int capacity; } Array; void array_new_impl(Array* array, struct FlAllocator* allocator); void* array_alloc_item_impl(Array* array, int size); #define array_push...
emoon/flowi
core/c/include/flowi_core/ui.h
<reponame>emoon/flowi /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ...
emoon/flowi
core/c/src/command_buffer.c
#include "command_buffer.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Create a new command buffer to fill with commands bool CommandBuffer_create(CommandBuffer* self, const char* id, struct FlAllocator* allocator, int len) { self->co...
emoon/flowi
flowi/c/shaders/generated/color_fill.h
#pragma once #include "color_fill_vs_glsl.h" #include "color_fill_vs_mtl.h" #include "color_fill_vs_spv.h" #include "color_fill_vs_essl.h" #include "color_fill_fs_glsl.h" #include "color_fill_fs_mtl.h" #include "color_fill_fs_spv.h" #include "color_fill_fs_essl.h" #if BX_PLATFORM_WINDOWS #include "color_fill_vs_dx9.h...
emoon/flowi
core/c/src/handles.h
<reponame>emoon/flowi<gh_stars>1-10 #pragma once #include "types.h" struct FlAllocator; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// typedef struct Handles { struct FlAllocator* allocator; u8* objects; u32* free_slots; int le...
emoon/flowi
flowi/c/examples/area_text.c
<filename>flowi/c/examples/area_text.c /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Only for API prototyping/ideas/not functional yet #include "flowi.h" ///////////////////////////////////////////////////////////////////////////////////////...
emoon/flowi
core/c/src/string_allocator.c
<reponame>emoon/flowi<gh_stars>1-10 #include "string_allocator.h" #include "allocator.h" #include "internal.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// typedef enum AllocType { AllocType_Persistant, AllocType_Frame, } AllocType; /...
emoon/flowi
flowi/c/shaders/generated/fs_texture_r_essl.h
<reponame>emoon/flowi static const uint8_t fs_texture_r_essl[268] = { 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s 0x5f, 0x74, 0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x00, // _tex............ 0x00, 0x00, 0x7...
emoon/flowi
flowi/c/shaders/generated/fs_texture_essl.h
static const uint8_t fs_texture_essl[246] = { 0x46, 0x53, 0x48, 0x0b, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, // FSH............s 0x5f, 0x74, 0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x00, // _tex............ 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x6...
emoon/flowi
core/c/src/ui.c
#include <flowi_core/math_data.h> #include <flowi_core/ui.h> #include "font_private.h" #include "image_private.h" #include "internal.h" #include "text.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Set position for the next ui-element (this...
emoon/flowi
core/c/src/layout.c
<gh_stars>1-10 #include <assert.h> #include "internal.h" #include "layout_private.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// FlLayoutAreaId fl_layout_area_create_impl(struct FlContext* self, FlString name, FlLayoutArea area) { const i...
emoon/flowi
core/c/include/flowi_core/font.h
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma once #include...
emoon/flowi
core/c/tests/string_allocator_tests.c
#include <assert.h> #include <flowi_core/manual.h> #include "../src/internal.h" #include "../src/string_allocator.h" #include "utest.h" extern FlAllocator g_malloc_allocator; static LinearAllocator s_frame_allocator; /////////////////////////////////////////////////////////////////////////////////////////////////////...
emoon/flowi
flowi/c/include/flowi/application.h
<filename>flowi/c/include/flowi/application.h<gh_stars>1-10 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // This file is auto-generated by api_gen. DO NOT EDIT! ///////////////////////////////////////////////////////////////////////////////////...
emoon/flowi
core/c/src/text.c
#include "text.h" #include <stdio.h> #include "font_private.h" #include "render.h" #include <emmintrin.h> // __m128i #include <smmintrin.h> #include <xmmintrin.h> // __m128 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Text_generate_ver...
emoon/flowi
core/c/src/string_allocator.h
#pragma once #include <flowi_core/manual.h> #include "linear_allocator.h" struct FlAllocator; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// typedef struct StringAllocator { struct FlAllocator* allocator; LinearAllocator* frame_allocat...
emoon/flowi
core/c/external/nanosvg/nanosvg.c
<reponame>emoon/flowi #include <math.h> #include <stdio.h> #include <string.h> #define NANOSVG_ALL_COLOR_KEYWORDS // Include full list of color keywords. #define NANOSVG_IMPLEMENTATION // Expands implementation #include "nanosvg.h" #define NANOSVGRAST_IMPLEMENTATION #include "nanosvgrast.h"
emoon/flowi
core/c/tests/image_tests.c
#include <flowi_core/image.h> #include <flowi_core/ui.h> #include "../src/atlas.h" #include "../src/internal.h" #include "utest.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// UTEST(Image, load_file_ok_stb) { struct FlGlobalState* state = ...