Skip to content

Instantly share code, notes, and snippets.

View jerstlouis's full-sized avatar

Jerome St-Louis jerstlouis

View GitHub Profile
import "ecere"
class Min3D : Window
{
caption = "Hello, 3D";
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
clientSize = { 640, 480 };
class Foo
{
int a;
int privateMethod()
{
return 0;
}
#include <stdio.h>
int currentYear = 2008;
class Person {
public:
struct
{
operator int ()
{
#define MODULE_NAME "HelloForm"
#include "ecere.hpp"
class HelloForm : public Window
{
public:
Label label;
HelloForm()
#define MODULE_NAME "HelloForm"
// #define __CONSOLE_APP__
#include "ecere.hpp"
class HelloForm2 : public Window
{
public:
Button button;
button.notifyClicked = +[](HelloForm2 & self, Button & btn, int x, int y, Modifiers mods)
{
MessageBox msgBox;
msgBox.caption = self.button.caption;
msgBox.contents = $("C++ Bindings!");
msgBox.modal();
return true;
};
class Foo { };
class Bar : Foo { };
class Test { public: void (* fn)(Foo &); };
void test()
{
Test t;
t.fn = +[](Bar & self) { };
}
#define MODULE_NAME "HelloForm"
#include "ecere.hpp"
GuiApplication app;
main_DEFINITION;
class HelloForm2 : public Window
{
#define MODULE_NAME "HelloForm"
#include <ecere>
GuiApplication app;
main_DEFINITION;
class HelloForm2 : public Window
{
void test()
{
unsigned int size = 5;
void (** foo)(void);
foo = new (void(*[size])(void));
}