Skip to content

Commit

Permalink
Python: Remove FakeVim::Internal namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Aug 9, 2014
1 parent 0f9e10c commit e4d5d9c
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions python/fakevim.sip
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ int FAKEVIM_PYQT_VERSION;
static const int FAKEVIM_PYQT_VERSION = FAKEVIM_PYQT_MAJOR_VERSION;
%End

namespace FakeVim {

%TypeHeaderCode
#include <fakevim/fakevimhandler.h>
%End

namespace Internal {

%TypeHeaderCode
#include <fakevim/fakevimhandler.h>
%End

enum RangeMode
{
// Reordering first three enum items here will break
Expand All @@ -43,35 +31,37 @@ struct Range

%TypeHeaderCode
#include <fakevim/fakevimhandler.h>
using namespace FakeVim::Internal;
%End

Range();
Range(int b, int e, FakeVim::Internal::RangeMode m = FakeVim::Internal::RangeCharMode);
Range(int b, int e, RangeMode m = RangeCharMode);
QString toString() const;
bool isValid() const;

int beginPos;
int endPos;
FakeVim::Internal::RangeMode rangemode;
RangeMode rangemode;
};

struct ExCommand
{

%TypeHeaderCode
#include <fakevim/fakevimhandler.h>
using namespace FakeVim::Internal;
%End

ExCommand();
ExCommand(const QString &cmd, const QString &args = QString(),
const FakeVim::Internal::Range &range = FakeVim::Internal::Range());
const Range &range = Range());

bool matches(const QString &min, const QString &full) const;

QString cmd;
bool hasBang;
QString args;
FakeVim::Internal::Range range;
Range range;
int count;
};

Expand All @@ -86,9 +76,6 @@ enum MessageLevel
MessageShowCmd // partial command
};

}; // namespace Internal
}; // namespace FakeVim

class FakeVimHandler : QObject /NoDefaultCtors/ {

%TypeHeaderCode
Expand All @@ -110,7 +97,7 @@ public slots:
void setCurrentFileName(const QString &fileName);
QString currentFileName() const;

void showMessage(FakeVim::Internal::MessageLevel level, const QString &msg);
void showMessage(MessageLevel level, const QString &msg);

// This executes an "ex" style command taking context
// information from the current widget.
Expand Down Expand Up @@ -140,7 +127,7 @@ public slots:
bool jumpToLocalMark(QChar mark, bool backTickMode);

private:
virtual bool handleExCommand(const FakeVim::Internal::ExCommand &cmd);
virtual bool handleExCommand(const ExCommand &cmd);
};

class FakeVimProxy : QObject /NoDefaultCtors/ {
Expand All @@ -166,7 +153,7 @@ public:
virtual void windowCommandRequested(const QString &key, int count);
virtual void findRequested(bool reverse);
virtual void findNextRequested(bool reverse);
virtual bool handleExCommand(const FakeVim::Internal::ExCommand &);
virtual bool handleExCommand(const ExCommand &);
virtual void disableBlockSelection();
virtual void enableBlockSelection(const QTextCursor &cursor);
virtual QTextCursor blockSelection();
Expand Down

0 comments on commit e4d5d9c

Please sign in to comment.