Skip to content

Instantly share code, notes, and snippets.

View jerstlouis's full-sized avatar

Jerome St-Louis jerstlouis

View GitHub Profile
#define MODULE_NAME "HelloForm"
#include "ecere.hpp"
GuiApplication app;
MAIN_DEFINITION;
class HelloForm : public Window
{
#define MODULE_NAME "HelloForm"
#include "ecere.hpp"
class HelloForm : public Window
{
public:
Button button;
CONSTRUCT(HelloForm, Window)
#define MODULE_NAME "HelloForm"
#include "ecere.hpp"
class HelloForm : public Window
{
public:
Button button;
CONSTRUCT(HelloForm, Window)
#define MODULE_NAME "HelloForm"
#include "ecere.hpp"
class HelloForm : public Window
{
public:
Button button;
CONSTRUCT(HelloForm, Window)
#define MODULE_NAME "HelloForm"
#include "ecere.hpp"
class HelloForm : public Window
{
public:
Button button;
CONSTRUCT(HelloForm, Window)
import "ecere"
class Form1 : Window
{
caption = $"Form1";
background = formColor;
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
import "ecere"
class Form1 : Window
{
caption = $"Form1";
background = formColor;
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
#undef _DEBUG
#include <Python.h>
typedef struct {
PyObject_HEAD
/* Type-specific fields go here. */
} noddy_NoddyObject;
static PyTypeObject noddy_NoddyType = {
PyVarObject_HEAD_INIT(NULL, 0)
############## ex1.py:
# -*- coding: utf-8 -*-
import pyEcere
pyEcere.funStuff("Hello, Python!\n")
############## pyEcere.py:
from _pyEcere import *
import sys
from _pyEcere import *
def funStuff(fun):
app = lib.eC_init(True, len(sys.argv), [ffi.new("char[]", i.encode('utf8')) for i in sys.argv])
lib.ecere_init(app)
lib.PrintLn(lib.class_String, fun.encode('utf8'), ffi.NULL)