/usr/include/libqinfinity/textbuffer.h is in libqinfinity-dev 1:0.5.2-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | /*
* Copyright 2009 Gregory Haynes <greg@greghaynes.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QINFINITY_TEXT_BUFFER_H
#define QINFINITY_TEXT_BUFFER_H
#include "buffer.h"
#include <libinfinity/common/inf-user.h>
#include <libinftext/inf-text-buffer.h>
#include <QPointer>
class QTextCodec;
class QTextEncoder;
namespace QInfinity
{
class TextChunk;
class User;
class TextBuffer
: public Buffer
{
Q_OBJECT;
public:
static QPointer<TextBuffer> wrap( InfTextBuffer *infBuffer,
QObject *parent = 0,
bool own_gobject = false );
~TextBuffer();
QString encoding();
QTextCodec *codec() const;
QTextEncoder *encoder() const;
unsigned int length();
TextChunk *slice( unsigned int pos,
unsigned int len );
void insertText( unsigned int pos,
const QByteArray &data,
unsigned int len,
User *user );
void insertChunk( unsigned int pos,
const TextChunk &chunk,
User *user );
void eraseText( unsigned int pos,
unsigned int len,
User *user );
Q_SIGNALS:
void textErased( unsigned int offset,
unsigned int len,
QPointer<QInfinity::User> user );
void textInserted( unsigned int offset,
const QInfinity::TextChunk &text,
QPointer<QInfinity::User> user );
protected:
TextBuffer( InfTextBuffer *infBuffer,
QObject *parent = 0,
bool own_gobject = false );
private:
static void text_erased_cb( InfTextBuffer *infTextBuffer,
unsigned int offset,
unsigned int len,
InfUser *user,
void *user_data );
static void text_inserted_cb( InfTextBuffer *infTextBuffer,
unsigned int offset,
InfTextChunk *textChunk,
InfUser *user,
void *user_data );
void emitTextErased( unsigned int offset,
unsigned int len,
InfUser *user );
void emitTextInserted( unsigned int offset,
InfTextChunk *textChunk,
InfUser *user );
unsigned long erase_text_handler;
unsigned long insert_text_handler;
QTextCodec *m_codec;
QTextEncoder *m_encoder;
};
}
#endif
|