Signed-off-by: Hans Dijkema <hans@dijkewijk.nl>
This commit is contained in:
2025-11-18 18:04:37 +01:00
parent 6784ba6ebc
commit 36aba3a381
2 changed files with 517 additions and 0 deletions

45
yellownotes.h Normal file
View File

@@ -0,0 +1,45 @@
#ifndef YELLOWNOTES_H
#define YELLOWNOTES_H
#include <string>
#include <list>
class YellowNote;
class YellowNotes
{
private:
void *_tray_menu;
void *_app;
std::list<YellowNote *> _notes;
public:
void loadNotes();
void clearNotes();
public:
std::string imageFile(const char *name);
std::string appDir();
std::string notesDir();
public:
void popupTrayMenu();
void newNote();
void quit();
public:
YellowNotes(void *app);
~YellowNotes();
};
#define YELLOWNOTES(obj) reinterpret_cast<YellowNotes *>(obj)
#define SIGNAL(type, func, member) \
static void func(GObject *obj, gpointer user_data) { type *o = reinterpret_cast<type *>(user_data); o->member(); }
#define SIGNAL2(type, func, member, argtype) \
static void func(GObject *obj, void *arg, gpointer user_data) { type *o = reinterpret_cast<type *>(user_data); o->member(reinterpret_cast<argtype *>(arg)); }
#define BSIGNAL2(type, func, member, argtype) \
static gboolean func(GObject *obj, void *arg, gpointer user_data) { type *o = reinterpret_cast<type *>(user_data); return o->member(reinterpret_cast<argtype *>(arg)); }
#endif // YELLOWNOTES_H