46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#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
|