TextBuffer

You may wish to begin by reading the text widget conceptual overview

which gives an overview of all the objects and data types related to the text widget and how they work together.

class TextBuffer : ObjectWrap {}

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(gtk.text_tag_table.TextTagTable table)

Creates a new text buffer.

Members

Functions

addMark
void addMark(gtk.text_mark.TextMark mark, gtk.text_iter.TextIter where)

Adds the mark at position where. The mark must not be added to another buffer, and if its name is not null then there must not be another mark in the buffer with the same name.

addSelectionClipboard
void addSelectionClipboard(gtk.clipboard.Clipboard clipboard)

Adds clipboard to the list of clipboards in which the selection contents of buffer are available. In most cases, clipboard will be the #GtkClipboard of type GDK_SELECTION_PRIMARY for a view of buffer.

applyTag
void applyTag(gtk.text_tag.TextTag tag, gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Emits the “apply-tag” signal on buffer. The default handler for the signal applies tag to the given range. start and end do not have to be in order.

applyTagByName
void applyTagByName(string name, gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Calls gtk.text_tag_table.TextTagTable.lookup on the buffer’s tag table to get a #GtkTextTag, then calls gtk.text_buffer.TextBuffer.applyTag.

backspace
bool backspace(gtk.text_iter.TextIter iter, bool interactive, bool defaultEditable)

Performs the appropriate action as if the user hit the delete key with the cursor at the position specified by iter. In the normal case a single character will be deleted, but when combining accents are involved, more than one character can be deleted, and when precomposed character and accent combinations are involved, less than one character will be deleted.

beginUserAction
void beginUserAction()

Called to indicate that the buffer operations between here and a call to gtk.text_buffer.TextBuffer.endUserAction are part of a single user-visible operation. The operations between gtk.text_buffer.TextBuffer.beginUserAction and gtk.text_buffer.TextBuffer.endUserAction can then be grouped when creating an undo stack. #GtkTextBuffer maintains a count of calls to gtk.text_buffer.TextBuffer.beginUserAction that have not been closed with a call to gtk.text_buffer.TextBuffer.endUserAction, and emits the “begin-user-action” and “end-user-action” signals only for the outermost pair of calls. This allows you to build user actions from other user actions.

connectApplyTag
gulong connectApplyTag(T callback, Flag!"After" after)

Connect to ApplyTag signal.

connectBeginUserAction
gulong connectBeginUserAction(T callback, Flag!"After" after)

Connect to BeginUserAction signal.

connectChanged
gulong connectChanged(T callback, Flag!"After" after)

Connect to Changed signal.

connectDeleteRange
gulong connectDeleteRange(T callback, Flag!"After" after)

Connect to DeleteRange signal.

connectEndUserAction
gulong connectEndUserAction(T callback, Flag!"After" after)

Connect to EndUserAction signal.

connectInsertChildAnchor
gulong connectInsertChildAnchor(T callback, Flag!"After" after)

Connect to InsertChildAnchor signal.

connectInsertPixbuf
gulong connectInsertPixbuf(T callback, Flag!"After" after)

Connect to InsertPixbuf signal.

connectInsertText
gulong connectInsertText(T callback, Flag!"After" after)

Connect to InsertText signal.

connectMarkDeleted
gulong connectMarkDeleted(T callback, Flag!"After" after)

Connect to MarkDeleted signal.

connectMarkSet
gulong connectMarkSet(T callback, Flag!"After" after)

Connect to MarkSet signal.

connectModifiedChanged
gulong connectModifiedChanged(T callback, Flag!"After" after)

Connect to ModifiedChanged signal.

connectPasteDone
gulong connectPasteDone(T callback, Flag!"After" after)

Connect to PasteDone signal.

connectRemoveTag
gulong connectRemoveTag(T callback, Flag!"After" after)

Connect to RemoveTag signal.

copyClipboard
void copyClipboard(gtk.clipboard.Clipboard clipboard)

Copies the currently-selected text to a clipboard.

createChildAnchor
gtk.text_child_anchor.TextChildAnchor createChildAnchor(gtk.text_iter.TextIter iter)

This is a convenience function which simply creates a child anchor with gtk.text_child_anchor.TextChildAnchor.new_ and inserts it into the buffer with gtk.text_buffer.TextBuffer.insertChildAnchor. The new anchor is owned by the buffer; no reference count is returned to the caller of gtk.text_buffer.TextBuffer.createChildAnchor.

createMark
gtk.text_mark.TextMark createMark(string markName, gtk.text_iter.TextIter where, bool leftGravity)

Creates a mark at position where. If mark_name is null, the mark is anonymous; otherwise, the mark can be retrieved by name using gtk.text_buffer.TextBuffer.getMark. If a mark has left gravity, and text is inserted at the mark’s current location, the mark will be moved to the left of the newly-inserted text. If the mark has right gravity (left_gravity = false), the mark will end up on the right of newly-inserted text. The standard left-to-right cursor is a mark with right gravity (when you type, the cursor stays on the right side of the text you’re typing).

cutClipboard
void cutClipboard(gtk.clipboard.Clipboard clipboard, bool defaultEditable)

Copies the currently-selected text to a clipboard, then deletes said text if it’s editable.

deleteInteractive
bool deleteInteractive(gtk.text_iter.TextIter startIter, gtk.text_iter.TextIter endIter, bool defaultEditable)

Deletes all editable text in the given range. Calls gtk.text_buffer.TextBuffer.delete_ for each editable sub-range of [start,end). start and end are revalidated to point to the location of the last deleted range, or left untouched if no text was deleted.

deleteMark
void deleteMark(gtk.text_mark.TextMark mark)

Deletes mark, so that it’s no longer located anywhere in the buffer. Removes the reference the buffer holds to the mark, so if you haven’t called gobject.object.ObjectWrap.ref_ on the mark, it will be freed. Even if the mark isn’t freed, most operations on mark become invalid, until it gets added to a buffer again with gtk.text_buffer.TextBuffer.addMark. Use gtk.text_mark.TextMark.getDeleted to find out if a mark has been removed from its buffer. The #GtkTextBuffer::mark-deleted signal will be emitted as notification after the mark is deleted.

deleteMarkByName
void deleteMarkByName(string name)

Deletes the mark named name; the mark must exist. See gtk.text_buffer.TextBuffer.deleteMark for details.

deleteSelection
bool deleteSelection(bool interactive, bool defaultEditable)

Deletes the range between the “insert” and “selection_bound” marks, that is, the currently-selected text. If interactive is true, the editability of the selection will be considered (users can’t delete uneditable text).

delete_
void delete_(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Deletes text between start and end. The order of start and end is not actually relevant; gtk.text_buffer.TextBuffer.delete_ will reorder them. This function actually emits the “delete-range” signal, and the default handler of that signal deletes the text. Because the buffer is modified, all outstanding iterators become invalid after calling this function; however, the start and end will be re-initialized to point to the location where text was deleted.

deserialize
bool deserialize(gtk.text_buffer.TextBuffer contentBuffer, gdk.atom.Atom format, gtk.text_iter.TextIter iter, ubyte[] data)

This function deserializes rich text in format format and inserts it at iter.

deserializeGetCanCreateTags
bool deserializeGetCanCreateTags(gdk.atom.Atom format)

This functions returns the value set with gtk.text_buffer.TextBuffer.deserializeSetCanCreateTags

deserializeSetCanCreateTags
void deserializeSetCanCreateTags(gdk.atom.Atom format, bool canCreateTags)

Use this function to allow a rich text deserialization function to create new tags in the receiving buffer. Note that using this function is almost always a bad idea, because the rich text functions you register should know how to map the rich text format they handler to your text buffers set of tags.

endUserAction
void endUserAction()

Should be paired with a call to gtk.text_buffer.TextBuffer.beginUserAction. See that function for a full explanation.

getBounds
void getBounds(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Retrieves the first and last iterators in the buffer, i.e. the entire buffer lies within the range [start,end).

getCharCount
int getCharCount()

Gets the number of characters in the buffer; note that characters and bytes are not the same, you can’t e.g. expect the contents of the buffer in string form to be this many bytes long. The character count is cached, so this function is very fast.

getCopyTargetList
gtk.target_list.TargetList getCopyTargetList()

This function returns the list of targets this text buffer can provide for copying and as DND source. The targets in the list are added with info values from the #GtkTextBufferTargetInfo enum, using gtk.target_list.TargetList.addRichTextTargets and gtk.target_list.TargetList.addTextTargets.

getEndIter
void getEndIter(gtk.text_iter.TextIter iter)

Initializes iter with the “end iterator,” one past the last valid character in the text buffer. If dereferenced with gtk.text_iter.TextIter.getChar, the end iterator has a character value of 0. The entire buffer lies in the range from the first position in the buffer (call gtk.text_buffer.TextBuffer.getStartIter to get character position 0) to the end iterator.

getHasSelection
bool getHasSelection()

Indicates whether the buffer has some text currently selected.

getInsert
gtk.text_mark.TextMark getInsert()

Returns the mark that represents the cursor (insertion point). Equivalent to calling gtk.text_buffer.TextBuffer.getMark to get the mark named “insert”, but very slightly more efficient, and involves less typing.

getIterAtChildAnchor
void getIterAtChildAnchor(gtk.text_iter.TextIter iter, gtk.text_child_anchor.TextChildAnchor anchor)

Obtains the location of anchor within buffer.

getIterAtLine
void getIterAtLine(gtk.text_iter.TextIter iter, int lineNumber)

Initializes iter to the start of the given line. If line_number is greater than the number of lines in the buffer, the end iterator is returned.

getIterAtLineIndex
void getIterAtLineIndex(gtk.text_iter.TextIter iter, int lineNumber, int byteIndex)

Obtains an iterator pointing to byte_index within the given line. byte_index must be the start of a UTF-8 character. Note bytes, not characters; UTF-8 may encode one character as multiple bytes.

getIterAtLineOffset
void getIterAtLineOffset(gtk.text_iter.TextIter iter, int lineNumber, int charOffset)

Obtains an iterator pointing to char_offset within the given line. Note characters, not bytes; UTF-8 may encode one character as multiple bytes.

getIterAtMark
void getIterAtMark(gtk.text_iter.TextIter iter, gtk.text_mark.TextMark mark)

Initializes iter with the current position of mark.

getIterAtOffset
void getIterAtOffset(gtk.text_iter.TextIter iter, int charOffset)

Initializes iter to a position char_offset chars from the start of the entire buffer. If char_offset is -1 or greater than the number of characters in the buffer, iter is initialized to the end iterator, the iterator one past the last valid character in the buffer.

getLineCount
int getLineCount()

Obtains the number of lines in the buffer. This value is cached, so the function is very fast.

getMark
gtk.text_mark.TextMark getMark(string name)

Returns the mark named name in buffer buffer, or null if no such mark exists in the buffer.

getModified
bool getModified()

Indicates whether the buffer has been modified since the last call to gtk.text_buffer.TextBuffer.setModified set the modification flag to false. Used for example to enable a “save” function in a text editor.

getPasteTargetList
gtk.target_list.TargetList getPasteTargetList()

This function returns the list of targets this text buffer supports for pasting and as DND destination. The targets in the list are added with info values from the #GtkTextBufferTargetInfo enum, using gtk.target_list.TargetList.addRichTextTargets and gtk.target_list.TargetList.addTextTargets.

getSelectionBound
gtk.text_mark.TextMark getSelectionBound()

Returns the mark that represents the selection bound. Equivalent to calling gtk.text_buffer.TextBuffer.getMark to get the mark named “selection_bound”, but very slightly more efficient, and involves less typing.

getSelectionBounds
bool getSelectionBounds(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Returns true if some text is selected; places the bounds of the selection in start and end (if the selection has length 0, then start and end are filled in with the same value). start and end will be in ascending order. If start and end are NULL, then they are not filled in, but the return value still indicates whether text is selected.

getSlice
string getSlice(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end, bool includeHiddenChars)

Returns the text in the range [start,end). Excludes undisplayed text (text marked with tags that set the invisibility attribute) if include_hidden_chars is false. The returned string includes a 0xFFFC character whenever the buffer contains embedded images, so byte and character indexes into the returned string do correspond to byte and character indexes into the buffer. Contrast with gtk.text_buffer.TextBuffer.getText. Note that 0xFFFC can occur in normal text as well, so it is not a reliable indicator that a pixbuf or widget is in the buffer.

getStartIter
void getStartIter(gtk.text_iter.TextIter iter)

Initialized iter with the first position in the text buffer. This is the same as using gtk.text_buffer.TextBuffer.getIterAtOffset to get the iter at character offset 0.

getTagTable
gtk.text_tag_table.TextTagTable getTagTable()

Get the #GtkTextTagTable associated with this buffer.

getText
string getText(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end, bool includeHiddenChars)

Returns the text in the range [start,end). Excludes undisplayed text (text marked with tags that set the invisibility attribute) if include_hidden_chars is false. Does not include characters representing embedded images, so byte and character indexes into the returned string do not correspond to byte and character indexes into the buffer. Contrast with gtk.text_buffer.TextBuffer.getSlice.

insert
void insert(gtk.text_iter.TextIter iter, string text)

Inserts len bytes of text at position iter. If len is -1, text must be nul-terminated and will be inserted in its entirety. Emits the “insert-text” signal; insertion actually occurs in the default handler for the signal. iter is invalidated when insertion occurs (because the buffer contents change), but the default signal handler revalidates it to point to the end of the inserted text.

insertAtCursor
void insertAtCursor(string text)

Simply calls gtk.text_buffer.TextBuffer.insert, using the current cursor position as the insertion point.

insertChildAnchor
void insertChildAnchor(gtk.text_iter.TextIter iter, gtk.text_child_anchor.TextChildAnchor anchor)

Inserts a child widget anchor into the text buffer at iter. The anchor will be counted as one character in character counts, and when obtaining the buffer contents as a string, will be represented by the Unicode “object replacement character” 0xFFFC. Note that the “slice” variants for obtaining portions of the buffer as a string include this character for child anchors, but the “text” variants do not. E.g. see gtk.text_buffer.TextBuffer.getSlice and gtk.text_buffer.TextBuffer.getText. Consider gtk.text_buffer.TextBuffer.createChildAnchor as a more convenient alternative to this function. The buffer will add a reference to the anchor, so you can unref it after insertion.

insertInteractive
bool insertInteractive(gtk.text_iter.TextIter iter, string text, bool defaultEditable)

Like gtk.text_buffer.TextBuffer.insert, but the insertion will not occur if iter is at a non-editable location in the buffer. Usually you want to prevent insertions at ineditable locations if the insertion results from a user action (is interactive).

insertInteractiveAtCursor
bool insertInteractiveAtCursor(string text, bool defaultEditable)

Calls gtk.text_buffer.TextBuffer.insertInteractive at the cursor position.

insertMarkup
void insertMarkup(gtk.text_iter.TextIter iter, string markup)

Inserts the text in markup at position iter. markup will be inserted in its entirety and must be nul-terminated and valid UTF-8. Emits the #GtkTextBuffer::insert-text signal, possibly multiple times; insertion actually occurs in the default handler for the signal. iter will point to the end of the inserted text on return.

insertPixbuf
void insertPixbuf(gtk.text_iter.TextIter iter, gdkpixbuf.pixbuf.Pixbuf pixbuf)

Inserts an image into the text buffer at iter. The image will be counted as one character in character counts, and when obtaining the buffer contents as a string, will be represented by the Unicode “object replacement character” 0xFFFC. Note that the “slice” variants for obtaining portions of the buffer as a string include this character for pixbufs, but the “text” variants do not. e.g. see gtk.text_buffer.TextBuffer.getSlice and gtk.text_buffer.TextBuffer.getText.

insertRange
void insertRange(gtk.text_iter.TextIter iter, gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Copies text, tags, and pixbufs between start and end (the order of start and end doesn’t matter) and inserts the copy at iter. Used instead of simply getting/inserting text because it preserves images and tags. If start and end are in a different buffer from buffer, the two buffers must share the same tag table.

insertRangeInteractive
bool insertRangeInteractive(gtk.text_iter.TextIter iter, gtk.text_iter.TextIter start, gtk.text_iter.TextIter end, bool defaultEditable)

Same as gtk.text_buffer.TextBuffer.insertRange, but does nothing if the insertion point isn’t editable. The default_editable parameter indicates whether the text is editable at iter if no tags enclosing iter affect editability. Typically the result of gtk.text_view.TextView.getEditable is appropriate here.

moveMark
void moveMark(gtk.text_mark.TextMark mark, gtk.text_iter.TextIter where)

Moves mark to the new location where. Emits the #GtkTextBuffer::mark-set signal as notification of the move.

moveMarkByName
void moveMarkByName(string name, gtk.text_iter.TextIter where)

Moves the mark named name (which must exist) to location where. See gtk.text_buffer.TextBuffer.moveMark for details.

pasteClipboard
void pasteClipboard(gtk.clipboard.Clipboard clipboard, gtk.text_iter.TextIter overrideLocation, bool defaultEditable)

Pastes the contents of a clipboard. If override_location is null, the pasted text will be inserted at the cursor position, or the buffer selection will be replaced if the selection is non-empty.

placeCursor
void placeCursor(gtk.text_iter.TextIter where)

This function moves the “insert” and “selection_bound” marks simultaneously. If you move them to the same place in two steps with gtk.text_buffer.TextBuffer.moveMark, you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.

registerDeserializeFormat
gdk.atom.Atom registerDeserializeFormat(string mimeType, gtk.types.TextBufferDeserializeFunc function_)

This function registers a rich text deserialization function along with its mime_type with the passed buffer.

registerDeserializeTagset
gdk.atom.Atom registerDeserializeTagset(string tagsetName)

This function registers GTK+’s internal rich text serialization format with the passed buffer. See gtk.text_buffer.TextBuffer.registerSerializeTagset for details.

registerSerializeFormat
gdk.atom.Atom registerSerializeFormat(string mimeType, gtk.types.TextBufferSerializeFunc function_)

This function registers a rich text serialization function along with its mime_type with the passed buffer.

registerSerializeTagset
gdk.atom.Atom registerSerializeTagset(string tagsetName)

This function registers GTK+’s internal rich text serialization format with the passed buffer. The internal format does not comply to any standard rich text format and only works between #GtkTextBuffer instances. It is capable of serializing all of a text buffer’s tags and embedded pixbufs.

removeAllTags
void removeAllTags(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Removes all tags in the range between start and end. Be careful with this function; it could remove tags added in code unrelated to the code you’re currently writing. That is, using this function is probably a bad idea if you have two or more unrelated code sections that add tags.

removeSelectionClipboard
void removeSelectionClipboard(gtk.clipboard.Clipboard clipboard)

Removes a #GtkClipboard added with gtk.text_buffer.TextBuffer.addSelectionClipboard.

removeTag
void removeTag(gtk.text_tag.TextTag tag, gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Emits the “remove-tag” signal. The default handler for the signal removes all occurrences of tag from the given range. start and end don’t have to be in order.

removeTagByName
void removeTagByName(string name, gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

Calls gtk.text_tag_table.TextTagTable.lookup on the buffer’s tag table to get a #GtkTextTag, then calls gtk.text_buffer.TextBuffer.removeTag.

selectRange
void selectRange(gtk.text_iter.TextIter ins, gtk.text_iter.TextIter bound)

This function moves the “insert” and “selection_bound” marks simultaneously. If you move them in two steps with gtk.text_buffer.TextBuffer.moveMark, you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.

self
TextBuffer self()

Returns this, for use in with statements.

serialize
ubyte[] serialize(gtk.text_buffer.TextBuffer contentBuffer, gdk.atom.Atom format, gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)

This function serializes the portion of text between start and end in the rich text format represented by format.

setModified
void setModified(bool setting)

Used to keep track of whether the buffer has been modified since the last time it was saved. Whenever the buffer is saved to disk, call gtk_text_buffer_set_modified (buffer, FALSE). When the buffer is modified, it will automatically toggled on the modified bit again. When the modified bit flips, the buffer emits the #GtkTextBuffer::modified-changed signal.

setText
void setText(string text)

Deletes current contents of buffer, and inserts text instead. If len is -1, text must be nul-terminated. text must be valid UTF-8.

unregisterDeserializeFormat
void unregisterDeserializeFormat(gdk.atom.Atom format)

This function unregisters a rich text format that was previously registered using gtk.text_buffer.TextBuffer.registerDeserializeFormat or gtk.text_buffer.TextBuffer.registerDeserializeTagset.

unregisterSerializeFormat
void unregisterSerializeFormat(gdk.atom.Atom format)

This function unregisters a rich text format that was previously registered using gtk.text_buffer.TextBuffer.registerSerializeFormat or gtk.text_buffer.TextBuffer.registerSerializeTagset

Properties

_gType
GType _gType [@property getter]
copyTargetList
gtk.target_list.TargetList copyTargetList [@property getter]

Get copyTargetList property.

cursorPosition
int cursorPosition [@property getter]

Get cursorPosition property.

hasSelection
bool hasSelection [@property getter]

Get hasSelection property.

pasteTargetList
gtk.target_list.TargetList pasteTargetList [@property getter]

Get pasteTargetList property.

tagTable
gtk.text_tag_table.TextTagTable tagTable [@property getter]
text
string text [@property getter]

Get text property.

text
string text [@property setter]

Set text property.

Static functions

_getGType
GType _getGType()
builder
TextBufferGidBuilder builder()

Get builder for gtk.text_buffer.TextBuffer

Inherited Members

From ObjectWrap

_setGObject
void _setGObject(void* cObj, Flag!"Take" take)

Set the GObject of a D ObjectWrap wrapper.

_cPtr
void* _cPtr(Flag!"Dup" dup)

Get a pointer to the underlying C object.

_ref
void* _ref(void* gObj)

Calls g_object_ref() on a GObject.

_unref
_unref(void* gObj)

Calls g_object_unref() on a GObject.

_getGType
GType _getGType()

Get the GType of an object.

_gType
GType _gType [@property getter]

GObject GType property.

self
ObjectWrap self()

Convenience method to return this cast to a type. For use in D with statements.

_getDObject
T _getDObject(void* cptr, Flag!"Take" take)

Template to get the D object from a C GObject and cast it to the given D object type.

connectSignalClosure
gulong connectSignalClosure(string signalDetail, DClosure closure, Flag!"After" after)

Connect a D closure to an object signal.

setProperty
void setProperty(string propertyName, T val)

Template for setting a GObject property.

getProperty
T getProperty(string propertyName)

Template for getting a GObject property.

compatControl
size_t compatControl(size_t what, void* data)
bindProperty
gobject.binding.Binding bindProperty(string sourceProperty, gobject.object.ObjectWrap target, string targetProperty, gobject.types.BindingFlags flags)

Creates a binding between source_property on source and target_property on target.

bindPropertyFull
gobject.binding.Binding bindPropertyFull(string sourceProperty, gobject.object.ObjectWrap target, string targetProperty, gobject.types.BindingFlags flags, gobject.closure.Closure transformTo, gobject.closure.Closure transformFrom)

Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

forceFloating
void forceFloating()

This function is intended for #GObject implementations to re-enforce a floating[floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling gobject.object.ObjectWrap.refSink.

freezeNotify
void freezeNotify()

Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

getData
void* getData(string key)

Gets a named field from the objects table of associations (see gobject.object.ObjectWrap.setData).

getProperty
void getProperty(string propertyName, gobject.value.Value value)

Gets a property of an object.

getQdata
void* getQdata(glib.types.Quark quark)

This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata.

getv
void getv(string[] names, gobject.value.Value[] values)

Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

isFloating
bool isFloating()

Checks whether object has a floating[floating-ref] reference.

notify
void notify(string propertyName)

Emits a "notify" signal for the property property_name on object.

notifyByPspec
void notifyByPspec(gobject.param_spec.ParamSpec pspec)

Emits a "notify" signal for the property specified by pspec on object.

refSink
gobject.object.ObjectWrap refSink()

Increase the reference count of object, and possibly remove the floating[floating-ref] reference, if object has a floating reference.

runDispose
void runDispose()

Releases all references to other objects. This can be used to break reference cycles.

setData
void setData(string key, void* data)

Each object carries around a table of associations from strings to pointers. This function lets you set an association.

setProperty
void setProperty(string propertyName, gobject.value.Value value)

Sets a property on an object.

stealData
void* stealData(string key)

Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

stealQdata
void* stealQdata(glib.types.Quark quark)

This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

thawNotify
void thawNotify()

Reverts the effect of a previous call to gobject.object.ObjectWrap.freezeNotify. The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

watchClosure
void watchClosure(gobject.closure.Closure closure)

This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling gobject.closure.Closure.invalidate on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, gobject.object.ObjectWrap.ref_ and gobject.object.ObjectWrap.unref are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

connectNotify
gulong connectNotify(string detail, T callback, Flag!"After" after)

Connect to Notify signal.