This file is indexed.

/usr/include/libqinfinity/abstracttextbuffer.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
 * 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_ABSTRACT_TEXT_BUFFER_H
#define QINFINITY_ABSTRACT_TEXT_BUFFER_H

#include "textbuffer.h"

class QString;

namespace QInfinity
{

class TextChunk;

/**
 * @brief Base class for implementing a text buffer.
 *
 * The AbstractTextBuffer is used to implement a custom
 * TextBuffer.  Most projects using the InfText or similar
 * plugin will find this of use.  You can cause your
 * custom implementation to be used by creating a subclass
 * of NotePlugin which creates the proper subclass.
 *
 * Currently, the AbstractTextBuffer provides the same
 * functionality as a DefaultTextBuffer only with calls to
 * the wrapping virtual functions appended for insert and
 * erase text.  In the future this will likely be changed.
 */
class AbstractTextBuffer
    : public TextBuffer
{
    public:
        /**
         * @brief Used by wrapped GObject
         */
        static void bufferIfaceInit( gpointer g_iface,
            gpointer iface_data );
        /**
         * @brief Used by wrapped GObject
         */
        static void textBufferIfaceInit( gpointer g_iface,
            gpointer iface_data );

        /**
         * @brief Create a text buffer base class.
         */
        AbstractTextBuffer( const QString &encoding,
            QObject *parent = 0 );

        virtual ~AbstractTextBuffer();

        InfTextChunk *chunk();

    protected:
        /**
         * @brief Called to insert text into buffer.
         *
         * Your implementation must account for all of
         * the text provided by this method, and only
         * for that text.  Not doing so can lead to
         * inconsistancies among users.
         */
        virtual void onInsertText( unsigned int offset,
            const TextChunk &chunk,
            User *user ) = 0;

        /**
         * @brief Called to erase text from buffer.
         */
        virtual void onEraseText( unsigned int offset,
            unsigned int length,
            User *user ) = 0;

    private:
        static void insert_text_cb( InfTextBuffer *buffer,
            unsigned int offset,
            InfTextChunk *chunk,
            InfUser *user );
        static void erase_text_cb( InfTextBuffer *buffer,
            unsigned int offset,
            unsigned int length,
            InfUser *user );

};

}

G_BEGIN_DECLS

#define QINF_TEXT_TYPE_ABSTRACT_BUFFER                 (qinf_text_abstract_buffer_get_type())
#define QINF_TEXT_ABSTRACT_BUFFER(obj)                 (G_TYPE_CHECK_INSTANCE_CAST((obj), QINF_TEXT_TYPE_ABSTRACT_BUFFER, QInfTextAbstractBuffer))
#define QINF_TEXT_ABSTRACT_BUFFER_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST((klass), QINF_TEXT_TYPE_ABSTRACT_BUFFER, QInfTextAbstractBufferClass))
#define QINF_TEXT_IS_ABSTRACT_BUFFER(obj)              (G_TYPE_CHECK_INSTANCE_TYPE((obj), QINF_TEXT_TYPE_ABSTRACT_BUFFER))
#define QINF_TEXT_IS_ABSTRACT_BUFFER_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE((klass), QINF_TEXT_TYPE_ABSTRACT_BUFFER))
#define QINF_TEXT_ABSTRACT_BUFFER_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS((obj), QINF_TEXT_TYPE_ABSTRACT_BUFFER, QInfTextAbstractBufferClass))

typedef struct _QInfTextAbstractBufferClass QInfTextAbstractBufferClass;
typedef struct _QInfTextAbstractBuffer QInfTextAbstractBuffer;

struct _QInfTextAbstractBufferClass
{
    GObjectClass parent_class;
};

struct _QInfTextAbstractBuffer
{
    GObject parent;
};

GType
qinf_text_abstract_buffer_get_type(void) G_GNUC_CONST;

QInfTextAbstractBuffer*
qinf_text_abstract_buffer_new(const gchar* encoding);

G_END_DECLS

#endif