#include <lib/base/object.h>
-SWIG_IGNORE(eWindowStyle);
-class eWindowStyle: public iObject
+class eWindowStyle_ENUMS
{
#ifdef SWIG
- eWindowStyle();
+ eWindowStyle_ENUMS();
+ ~eWindowStyle_ENUMS();
#endif
public:
-#ifndef SWIG
- virtual void handleNewSize(eWindow *wnd, eSize &size, eSize &offset) = 0;
- virtual void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title) = 0;
- virtual void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size) = 0;
- virtual void setStyle(gPainter &painter, int what) = 0;
- virtual void drawFrame(gPainter &painter, const eRect &frame, int type) = 0;
- virtual RESULT getFont(int what, ePtr<gFont> &font) = 0;
-#endif
- virtual ~eWindowStyle() = 0;
enum {
styleLabel,
styleListboxSelected,
styleListboxMarked,
styleListboxMarkedAndSelected
};
-
+
enum {
frameButton,
frameListboxEntry
};
-
+
enum {
fontStatic,
fontButton,
fontTitlebar
};
};
+
+SWIG_IGNORE(eWindowStyle);
+class eWindowStyle: public eWindowStyle_ENUMS, public iObject
+{
+#ifdef SWIG
+ eWindowStyle();
+#endif
+public:
+#ifndef SWIG
+ virtual void handleNewSize(eWindow *wnd, eSize &size, eSize &offset) = 0;
+ virtual void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title) = 0;
+ virtual void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size) = 0;
+ virtual void setStyle(gPainter &painter, int what) = 0;
+ virtual void drawFrame(gPainter &painter, const eRect &frame, int type) = 0;
+ virtual RESULT getFont(int what, ePtr<gFont> &font) = 0;
+#endif
+ virtual ~eWindowStyle() = 0;
+};
SWIG_TEMPLATE_TYPEDEF(ePtr<eWindowStyle>, eWindowStylePtr);
SWIG_IGNORE(eWindowStyleManager);
#ifndef SWIG
eWindowStyleManager();
~eWindowStyleManager();
+ static SWIG_VOID(int) getInstance(ePtr<eWindowStyleManager> &SWIG_NAMED_OUTPUT(mgr)) { mgr = m_instance; if (!mgr) return -1; return 0; }
#endif
void getStyle(int style_id, ePtr<eWindowStyle> &SWIG_OUTPUT);
void setStyle(int style_id, eWindowStyle *style);
- static SWIG_VOID(int) getInstance(ePtr<eWindowStyleManager> &SWIG_NAMED_OUTPUT(mgr)) { mgr = m_instance; if (!mgr) return -1; return 0; }
private:
static eWindowStyleManager *m_instance;
std::map<int, ePtr<eWindowStyle> > m_current_style;
result = *res;
return 0;
}
-PyObject *New_TestObj()
-{
- TestObj *result = (TestObj *)new TestObj();
- return SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_TestObj, 1);
-}
PyObject *New_eServiceReference(const eServiceReference &ref)
{
eServiceReference *result = new eServiceReference(ref);
#include <lib/python/python.h>
#undef SKIP_PART1
-DEFINE_REF(TestObj);
-
-TestObj::TestObj()
-{
- eDebug("create %p", this);
-}
-
-TestObj::~TestObj()
-{
- eDebug("destroy %p", this);
-}
-
ePython::ePython()
{
// Py_VerboseFlag = 1;
#endif // !SWIG && !SKIP_PART1
#ifndef SKIP_PART2
-
-class TestObj
-{
-DECLARE_REF(TestObj);
-public:
- TestObj();
- ~TestObj();
-};
-SWIG_TEMPLATE_TYPEDEF(ePtr<TestObj>, TestObjPtr);
-
#ifndef SWIG
-extern PyObject *New_TestObj();
#ifdef PYTHON_REFCOUNT_DEBUG
inline void Impl_Py_DECREF(const char* file, int line, const ePyObject &obj)
{
return ePyObject(PyLong_FromLongLong(val), file, line);
}
-inline ePyObject Impl_New_TestObj(const char* file, int line)
-{
- return ePyObject(New_TestObj(), file, line);
-}
-
inline ePyObject Impl_PyList_GET_ITEM(const char *file, int line, ePyObject list, unsigned int pos)
{
return ePyObject(PyList_GET_ITEM(list, pos), file, line);
return PyLong_FromLongLong(val);
}
-inline ePyObject Impl_New_TestObj()
-{
- return New_TestObj();
-}
-
inline ePyObject Impl_PyList_GET_ITEM(ePyObject list, unsigned int pos)
{
return PyList_GET_ITEM(list, pos);
#define PyLong_FromLong(val) Impl_PyLong_FromLong(__FILE__, __LINE__, val)
#define PyLong_FromUnsignedLong(val) Impl_PyLong_FromUnsignedLong(__FILE__, __LINE__, val)
#define PyLong_FromLongLong(val) Impl_PyLong_FromLongLong(__FILE__, __LINE__, val)
-#define NEW_TestObj(...) Impl_New_TestObj(__FILE__, __LINE__)
#define PyList_GET_ITEM(list, pos) Impl_PyList_GET_ITEM(__FILE__, __LINE__, list, pos)
#define PyTuple_GET_ITEM(list, pos) Impl_PyTuple_GET_ITEM(__FILE__, __LINE__, list, pos)
#else
#define PyLong_FromLong(val) Impl_PyLong_FromLong(val)
#define PyLong_FromUnsignedLong(val) Impl_PyLong_FromUnsignedLong(val)
#define PyLong_FromLongLong(val) Impl_PyLong_FromLongLong(val)
-#define NEW_TestObj(...) Impl_New_TestObj()
#define PyList_GET_ITEM(list, pos) Impl_PyList_GET_ITEM(list, pos)
#define PyTuple_GET_ITEM(list, pos) Impl_PyTuple_GET_ITEM(list, pos)
#endif