medit/moo/mooedit/mooeditfileinfo-impl.h

75 lines
1.5 KiB
C
Raw Normal View History

2016-01-04 03:56:42 -08:00
#pragma once
#include "mooeditfileinfo.h"
2016-01-31 00:03:05 -08:00
#include "moocpp/moocpp.h"
using namespace moo;
struct MooOpenInfo
{
g::FilePtr file;
gstr encoding;
int line;
MooOpenFlags flags;
MooOpenInfo(GFile* file, const char* encoding, int line, MooOpenFlags flags)
: file(wrap_new(g_file_dup(file)))
2016-01-21 03:16:33 -08:00
, encoding(gstr::wrap(encoding))
, line(line)
, flags(flags)
2016-01-05 02:18:52 -08:00
{
}
MooOpenInfo(const MooOpenInfo& other)
: file(other.file->dup())
2016-01-21 03:16:33 -08:00
, encoding(other.encoding)
, line(other.line)
, flags(other.flags)
{
}
MooOpenInfo& operator=(const MooOpenInfo&) = delete;
MooOpenInfo(MooOpenInfo&&) = delete;
MooOpenInfo& operator=(MooOpenInfo&&) = delete;
};
2016-01-04 03:56:42 -08:00
struct MooReloadInfo : public GObject
{
MooReloadInfo(const char* encoding, int line)
2016-01-21 03:16:33 -08:00
: encoding(gstr::wrap(encoding))
, line(line)
2016-01-05 02:18:52 -08:00
{
}
MooReloadInfo(const MooReloadInfo& other)
2016-01-21 03:16:33 -08:00
: encoding(other.encoding)
, line(other.line)
{
}
gstr encoding;
int line;
MooReloadInfo(MooReloadInfo&&) = delete;
};
2016-01-04 03:56:42 -08:00
struct MooSaveInfo : public GObject
{
g::FilePtr file;
gstr encoding;
MooSaveInfo(GFile* file, const char* encoding)
: file(wrap_new(g_file_dup(file)))
2016-01-21 03:16:33 -08:00
, encoding(gstr::wrap(encoding))
{
}
MooSaveInfo(const MooSaveInfo& other)
: file(other.file->dup())
2016-01-21 03:16:33 -08:00
, encoding(other.encoding)
{
}
MooSaveInfo(MooSaveInfo&&) = delete;
};