GithubHelp home page GithubHelp logo

wyrover / afaik Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andycbriggs/win32-experiments

0.0 1.0 0.0 308 KB

A collection of useful classes for building win32 applications.

License: MIT License

C++ 99.27% C 0.73%

afaik's Introduction

afaik

A sketchbook of novel approaches to working with the win32 api.

Why?

Experimentation, curiosity and some motivation to make writing native win32 applications fun and expressive.

The following snippet is from an early test:

std::shared_ptr<Window> window = std::make_shared<Window>();
window->setTitle(L"Server!");
window->show();

std::shared_ptr<TextComponent> status = std::make_shared<TextComponent>();
status->setPosition(10, 10);
status->setFontSize(32);
status->setColor(236, 240, 241);
status->setText(L"Ready!");

window->addUIComponent(status);

std::shared_ptr<TCPSocket> socket = std::make_shared<TCPSocket>();
socket->on(SocketEvent::Error, [=] (SocketEvent ev) {
  status->setText(ev.error);
});
socket->on(SocketEvent::Connection, [=] (SocketEvent ev) {
  status->setText(L"Connection Received");
  clients.push_back(ev.socket);
  ev.socket->on(SocketEvent::Data, [=] (SocketEvent ev) {
    status->setText(data);
  });
});
socket->bind("127.0.0.1", 1337);
socket->listen();

afaik's People

Contributors

andycbriggs avatar kaidoe avatar

Watchers

wyrover avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.