Commit 72721359 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

rename struct vte_char_attributes to VteCharAttributes, fixup some docs.

* src/vte.c, src/vte.h, src/vteaccess.c: rename struct vte_char_attributes to
	VteCharAttributes, fixup some docs.
* doc/reference: finish up docs.
parent 4de594de
2003-03-06 nalin
* src/vte.c, src/vte.h, src/vteaccess.c: rename struct
vte_char_attributes to VteCharAttributes, fixup some docs.
* doc/reference: finish up docs.
2003-03-05 nalin
* vte.pc.in: add FT2_LIBS and FT2_CFLAGS to our libs and cflags. Add
xft >= 2.0 and fontconfig as hard requirements.
......
......@@ -20,7 +20,7 @@ retrieve the exit status of child processes which have exited.
<!-- ##### STRUCT VteReaper ##### -->
<para>
This should not be accessed directly.
</para>
......
......@@ -20,6 +20,106 @@ manipulating psuedo-terminals.
pty
<!-- ##### SECTION ./tmpl/reaper.sgml.sgml:Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/reaper.sgml.sgml:See_Also ##### -->
<para>
</para>
<!-- ##### SECTION ./tmpl/reaper.sgml.sgml:Short_Description ##### -->
<!-- ##### SECTION ./tmpl/reaper.sgml.sgml:Title ##### -->
reaper.sgml
<!-- ##### MACRO VTE_META_MASK ##### -->
<para>
</para>
<!-- ##### MACRO VTE_NUMLOCK_MASK ##### -->
<para>
</para>
<!-- ##### ENUM VteDebugFlags ##### -->
<para>
</para>
@VTE_DEBUG_MISC:
@VTE_DEBUG_PARSE:
@VTE_DEBUG_IO:
@VTE_DEBUG_UPDATES:
@VTE_DEBUG_EVENTS:
@VTE_DEBUG_SIGNALS:
@VTE_DEBUG_SELECTION:
@VTE_DEBUG_SUBSTITUTION:
@VTE_DEBUG_RING:
@VTE_DEBUG_PTY:
@VTE_DEBUG_CURSOR:
@VTE_DEBUG_KEYBOARD:
@VTE_DEBUG_LIFECYCLE:
<!-- ##### STRUCT VteRing ##### -->
<para>
</para>
@free:
@user_data:
@array:
@delta:
@length:
@max:
<!-- ##### USER_FUNCTION VteRingFreeFunc ##### -->
<para>
</para>
@freeing:
@data:
<!-- ##### STRUCT VteTerminalPrivate ##### -->
<para>
</para>
<!-- ##### STRUCT vte_buffer ##### -->
<para>
</para>
@bytes:
<!-- ##### STRUCT vte_capability_quark ##### -->
<para>
</para>
@capability:
@key:
@quark:
<!-- ##### STRUCT vte_capability_string ##### -->
<para>
</para>
@quark:
<!-- ##### FUNCTION vte_pty_get_size ##### -->
<para>
......@@ -57,6 +157,101 @@ pty
@rows:
@Returns:
<!-- ##### FUNCTION vte_ring_append ##### -->
<para>
</para>
@ring:
@data:
<!-- ##### FUNCTION vte_ring_at ##### -->
<para>
</para>
@ring:
@Param2:
@Returns:
<!-- ##### FUNCTION vte_ring_contains ##### -->
<para>
</para>
@ring:
@Param2:
@Returns:
<!-- ##### FUNCTION vte_ring_delta ##### -->
<para>
</para>
@ring:
@Returns:
<!-- ##### FUNCTION vte_ring_free ##### -->
<para>
</para>
@ring:
@free_elements:
<!-- ##### MACRO vte_ring_index ##### -->
<para>
</para>
@ring:
@cast:
@position:
<!-- ##### FUNCTION vte_ring_insert ##### -->
<para>
</para>
@ring:
@Param2:
@data:
<!-- ##### FUNCTION vte_ring_length ##### -->
<para>
</para>
@ring:
@Returns:
<!-- ##### FUNCTION vte_ring_new ##### -->
<para>
</para>
@Param1:
@free:
@data:
@Returns:
<!-- ##### FUNCTION vte_ring_next ##### -->
<para>
</para>
@ring:
@Returns:
<!-- ##### FUNCTION vte_ring_remove ##### -->
<para>
</para>
@ring:
@Param2:
@free_element:
<!-- ##### FUNCTION vte_terminal_fork_logged_command ##### -->
<para>
......
......@@ -14,38 +14,34 @@ A VteTerminal is a terminal emulator implemented as a GTK2 widget.
</para>
<!-- ##### STRUCT VteTerminalPrivate ##### -->
<para>
</para>
<!-- ##### ENUM VteTerminalEraseBinding ##### -->
<para>
</para>
@VTE_ERASE_AUTO: For backspace, attempt to determine the right value from the terminal's IO settings. For delete, use the control sequence.
@VTE_ERASE_ASCII_BACKSPACE: Send an ASCII backspace character (0x08).
@VTE_ERASE_ASCII_DELETE: Send an ASCII delete character (0x7F).
@VTE_ERASE_DELETE_SEQUENCE: Send the "@7" control sequence.
<!-- ##### STRUCT VteTerminal ##### -->
<para>
All of these fields should be considered read-only.
</para>
@widget:
@adjustment: Scroll bar adjustments.
@char_width: Width of a narrow character cell.
@char_height: Height of a character cell.
@char_ascent:
@char_descent:
@char_ascent: The distance (in pixels) from the baseline of drawn text to the top of the character cell.
@char_descent: The distance (in pixels) from the baseline of drawn text to the bottom of the character cell.
@row_count: Number of visible rows.
@column_count: Number of visible columns.
@window_title: The terminal's idea of what the window's title should be.
@icon_title: The terminal's idea of what the window's title should be when iconified.
<!-- ##### ENUM VteTerminalEraseBinding ##### -->
<para>
An enumerated type which can be used to indicate which string the terminal
should send to an application when the user presses the Delete or Backspace
keys.
</para>
@VTE_ERASE_AUTO: For backspace, attempt to determine the right value from the terminal's IO settings. For delete, use the control sequence.
@VTE_ERASE_ASCII_BACKSPACE: Send an ASCII backspace character (0x08).
@VTE_ERASE_ASCII_DELETE: Send an ASCII delete character (0x7F).
@VTE_ERASE_DELETE_SEQUENCE: Send the "@@7" control sequence.
<!-- ##### FUNCTION vte_terminal_new ##### -->
<para>
</para>
......@@ -307,6 +303,24 @@ A VteTerminal is a terminal emulator implemented as a GTK2 widget.
@transparent:
<!-- ##### FUNCTION vte_terminal_set_background_tint_color ##### -->
<para>
</para>
@terminal:
@color:
<!-- ##### FUNCTION vte_terminal_set_scroll_background ##### -->
<para>
</para>
@terminal:
@scroll:
<!-- ##### FUNCTION vte_terminal_set_cursor_blinks ##### -->
<para>
......@@ -517,6 +531,16 @@ A VteTerminal is a terminal emulator implemented as a GTK2 widget.
@Param3:
<!-- ##### FUNCTION vte_terminal_match_set_cursor ##### -->
<para>
</para>
@terminal:
@tag:
@cursor:
<!-- ##### FUNCTION vte_terminal_set_emulation ##### -->
<para>
......
......@@ -16,7 +16,7 @@ Accessibility peer of #VteTerminal.
<!-- ##### STRUCT VteTerminalAccessible ##### -->
<para>
This should not be accessed directly. Use the #AtkText interface instead.
</para>
......
<SECTION>
<FILE>vte</FILE>
VteTerminalPrivate
<TITLE>VteTerminal</TITLE>
VteTerminalEraseBinding
VteTerminal
VteTerminalEraseBinding
vte_terminal_new
vte_terminal_im_append_menuitems
vte_terminal_fork_command
......@@ -32,6 +31,8 @@ vte_terminal_set_background_image
vte_terminal_set_background_image_file
vte_terminal_set_background_saturation
vte_terminal_set_background_transparent
vte_terminal_set_background_tint_color
vte_terminal_set_scroll_background
vte_terminal_set_cursor_blinks
vte_terminal_set_scrollback_lines
vte_terminal_set_font
......@@ -53,6 +54,7 @@ vte_terminal_match_clear_all
vte_terminal_match_add
vte_terminal_match_remove
vte_terminal_match_check
vte_terminal_match_set_cursor
vte_terminal_set_emulation
vte_terminal_get_emulation
vte_terminal_set_encoding
......@@ -63,13 +65,13 @@ vte_terminal_get_padding
vte_terminal_erase_binding_get_type
VTE_TYPE_TERMINAL_ERASE_BINDING
VTE_IS_TERMINAL_ERASE_BINDING
VTE_TERMINAL
VTE_IS_TERMINAL
VTE_TYPE_TERMINAL
VTE_IS_TERMINAL
VTE_TERMINAL
vte_terminal_get_type
VTE_TERMINAL_CLASS
VTE_IS_TERMINAL_CLASS
VTE_TERMINAL_GET_CLASS
VTE_IS_TERMINAL_CLASS
VTE_TERMINAL_CLASS
<SUBSECTION Binding Accessors>
vte_terminal_get_adjustment
vte_terminal_get_char_ascent
......@@ -111,3 +113,37 @@ VTE_REAPER_CLASS
VTE_IS_REAPER_CLASS
VTE_REAPER_GET_CLASS
</SECTION>
<SECTION>
<FILE>internals</FILE>
<TITLE>Internals</TITLE>
<SUBSECTION Private>
VteTerminalPrivate
VTE_NUMLOCK_MASK
VTE_META_MASK
vte_buffer
VteDebugFlags
vte_capability_string
vte_capability_quark
VteCharAttributes
VteRing
VteRingFreeFunc
vte_ring_remove
vte_ring_next
vte_ring_at
vte_ring_length
vte_ring_new
vte_ring_contains
vte_ring_index
vte_ring_insert
vte_ring_free
vte_ring_append
vte_ring_delta
vte_draw
vte_draw_impl
vte_draw_text_request
VTE_DRAW_OPAQUE
VTE_DRAW_SINGLE_WIDE_CHARACTERS
VTE_DRAW_MAX_LENGTH
VTE_DRAW_DOUBLE_WIDE_CHARACTERS
</SECTION>
......@@ -1323,7 +1323,7 @@ vte_terminal_match_contents_refresh(VteTerminal *terminal)
GArray *array;
g_return_if_fail(VTE_IS_TERMINAL(terminal));
vte_terminal_match_contents_clear(terminal);
array = g_array_new(FALSE, TRUE, sizeof(struct vte_char_attributes));
array = g_array_new(FALSE, TRUE, sizeof(struct _VteCharAttributes));
terminal->pvt->match_contents = vte_terminal_get_text(terminal,
always_selected,
NULL,
......@@ -1487,7 +1487,7 @@ vte_terminal_match_check_internal(VteTerminal *terminal,
{
int i, j, ret, offset;
struct vte_match_regex *regex = NULL;
struct vte_char_attributes *attr = NULL;
struct _VteCharAttributes *attr = NULL;
gssize coffset;
regmatch_t matches[256];
#ifdef VTE_DEBUG
......@@ -1514,7 +1514,7 @@ vte_terminal_match_check_internal(VteTerminal *terminal,
offset >= 0;
offset--) {
attr = &g_array_index(terminal->pvt->match_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
offset);
if ((row == attr->row) &&
(column == attr->column) &&
......@@ -1581,14 +1581,14 @@ vte_terminal_match_check_internal(VteTerminal *terminal,
#ifdef VTE_DEBUG
if (_vte_debug_on(VTE_DEBUG_MISC)) {
char *match;
struct vte_char_attributes *sattr, *eattr;
struct _VteCharAttributes *sattr, *eattr;
match = g_strndup(terminal->pvt->match_contents + matches[j].rm_so + coffset,
matches[j].rm_eo - matches[j].rm_so);
sattr = &g_array_index(terminal->pvt->match_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
matches[j].rm_so + coffset);
eattr = &g_array_index(terminal->pvt->match_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
matches[j].rm_eo + coffset - 1);
fprintf(stderr, "Match %d `%s' from %d(%ld,%ld) to %d(%ld,%ld) (%d).\n",
j, match,
......@@ -6198,15 +6198,15 @@ vte_terminal_set_color_background(VteTerminal *terminal,
*
* The terminal widget uses a 28-color model comprised of the default foreground
* and background colors, the bold foreground color, the dim foreground
* color, an eight color palette, and bold versions of the eight color palette,
* color, an eight color palette, bold versions of the eight color palette,
* and a dim version of the the eight color palette.
*
* @palette_size must be either 0, 8, 16, or 24. If @foreground is NULL and
* @palette_size is greater than 0, the new foreground color is taken from
* @palette[7]. If @background is NULL and @palette_size is greater than 0,
* the new background color is taken from @palette[0]. If
* @palette_size is 8 or 16, the third (dim) and possibly second (bold)
* 8-color palette is extrapolated from the new background color and the items
* @palette_size is 8 or 16, the third (dim) and possibly the second (bold)
* 8-color palettes are extrapolated from the new background color and the items
* in @palette.
*
*/
......@@ -6757,7 +6757,7 @@ _vte_terminal_disconnect_pty_write(VteTerminal *terminal)
* @utmp: TRUE if the session should be logged to the utmp/utmpx log
* @wtmp: TRUE if the session should be logged to the wtmp/wtmpx log
*
* Starts the specified command under a newly-alllocated control
* Starts the specified command under a newly-allocated controlling
* pseudo-terminal. TERM is automatically set to reflect the terminal widget's
* emulation setting. If @lastlog, @utmp, or @wtmp are TRUE, logs the session
* to the specified system log files.
......@@ -8561,7 +8561,7 @@ vte_terminal_match_hilite(VteTerminal *terminal, double x, double y)
int start, end, width, height;
long rows, rowe;
char *match;
struct vte_char_attributes *attr;
struct _VteCharAttributes *attr;
VteScreen *screen;
long delta;
......@@ -8599,12 +8599,12 @@ vte_terminal_match_hilite(VteTerminal *terminal, double x, double y)
rowe = terminal->pvt->match_end.row;
/* Read the new locations. */
attr = &g_array_index(terminal->pvt->match_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
start);
terminal->pvt->match_start.row = attr->row;
terminal->pvt->match_start.column = attr->column;
attr = &g_array_index(terminal->pvt->match_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
end);
terminal->pvt->match_end.row = attr->row;
terminal->pvt->match_end.column = attr->column;
......@@ -8686,7 +8686,7 @@ vte_terminal_copy_cb(GtkClipboard *clipboard, GtkSelectionData *data,
*
* Extracts a view of the visible part of the string. If @is_selected is not
* NULL, characters will only be read if @is_selected returns TRUE after being
* passed the column and row, respectively. A #vte_char_attributes structure
* passed the column and row, respectively. A #VteCharAttributes structure
* is added to @attributes for each byte added to the returned string detailing
* the character's position, colors, and other characteristics. The
* entire scrollback buffer is scanned, so it is possible to read the entire
......@@ -8708,7 +8708,7 @@ vte_terminal_get_text_range(VteTerminal *terminal,
VteScreen *screen;
struct vte_charcell *pcell = NULL;
GString *string;
struct vte_char_attributes attr;
struct _VteCharAttributes attr;
struct vte_palette_entry fore, back, *palette;
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL);
......@@ -8857,7 +8857,7 @@ vte_terminal_get_text_range(VteTerminal *terminal,
*
* Extracts a view of the visible part of the terminal. If @is_selected is not
* NULL, characters will only be read if @is_selected returns TRUE after being
* passed the column and row, respectively. A #vte_char_attributes structure
* passed the column and row, respectively. A #VteCharAttributes structure
* is added to @attributes for each byte added to the returned string detailing
* the character's position, colors, and other characteristics.
*
......@@ -10875,7 +10875,7 @@ vte_terminal_close_font(VteTerminal *terminal)
* Sets the font used for rendering all text displayed by the terminal,
* overriding any fonts set using gtk_widget_modify_font(). The terminal
* will immediately attempt to load the desired font, retrieve its
* metrics, and attempts to resize itself to keep the same number of rows
* metrics, and attempt to resize itself to keep the same number of rows
* and columns.
*
*/
......@@ -15484,7 +15484,7 @@ vte_terminal_copy_primary(VteTerminal *terminal)
* child. If necessary, the data is converted from UTF-8 to the terminal's
* current encoding. The terminal will call also paste the
* #GDK_SELECTION_PRIMARY selection when the user clicks with the the second
* mouse button.
* mouse button or presses Shift+Insert.
*
*/
void
......@@ -15838,15 +15838,15 @@ vte_terminal_queue_background_update(VteTerminal *terminal,
/**
* vte_terminal_set_background_saturation:
* @terminal: a #VteTerminal
* @saturation: TRUE if the terminal should fake transparency
* @saturation: a floating point value between 0.0 and 1.0.
*
* If a background image has been set using
* vte_terminal_set_background_image(),
* vte_terminal_set_background_image_file(), or
* vte_terminal_set_background_transparent(), the terminal will adjust the
* colors of the image before drawing the image. To do so, the terminal
* will create a copy of the background image (or snapshot of the root
* window) and modify its pixel values.
* vte_terminal_set_background_transparent(), and the saturation value is less
* than 1.0, the terminal will adjust the colors of the image before drawing
* the image. To do so, the terminal will create a copy of the background
* image (or snapshot of the root window) and modify its pixel values.
*
* If your application intends to create multiple terminal widgets with the
* same settings, performing this step yourself and just using
......@@ -15878,10 +15878,11 @@ vte_terminal_set_background_saturation(VteTerminal *terminal, double saturation)
* If a background image has been set using
* vte_terminal_set_background_image(),
* vte_terminal_set_background_image_file(), or
* vte_terminal_set_background_transparent(), the terminal will adjust the
* brightness of the image before drawing the image. To do so, the terminal
* will create a copy of the background image (or snapshot of the root
* window) and modify its pixel values.
* vte_terminal_set_background_transparent(), and the value set by
* vte_terminal_set_background_saturation() is less than one, the terminal
* will adjust the color of the image before drawing the image. To do so,
* the terminal will create a copy of the background image (or snapshot of
* the root window) and modify its pixel values.
*
* If your application intends to create multiple terminal widgets with the
* same settings, performing this step yourself and just using
......@@ -16067,8 +16068,8 @@ vte_terminal_set_background_image(VteTerminal *terminal, GdkPixbuf *image)
* @path: path to an image file
*
* Sets a background image for the widget. If specified by
* vte_terminal_set_background_saturation, the terminal will make its
* in-memory copy of the image darker for its own use.
* vte_terminal_set_background_saturation(), the terminal will tint its
* in-memory copy of the image before applying it to the terminal.
*
* This is a convenience wrapper for vte_terminal_set_background_image().
* If your application intends to create multiple terminal widgets using the
......
......@@ -114,11 +114,12 @@ typedef enum {
} VteTerminalEraseBinding;
/* The structure we return as the supplemental attributes for strings. */
struct vte_char_attributes {
struct _VteCharAttributes {
long row, column;
GdkColor fore, back;
gboolean underline:1, strikethrough:1;
};
typedef struct _VteCharAttributes VteCharAttributes;
/* The widget's type. */
GtkType vte_terminal_get_type(void);
......@@ -249,7 +250,7 @@ void vte_terminal_reset(VteTerminal *terminal, gboolean full,
/* Read the contents of the terminal, using a callback function to determine
* if a particular location on the screen (0-based) is interesting enough to
* include. Each byte in the returned string will have a corresponding
* struct vte_char_attributes in the passed GArray, if the array was not NULL.
* VteCharAttributes structure in the passed GArray, if the array was not NULL.
* Note that it will have one entry per byte, not per character, so indexes
* should match up exactly. */
char *vte_terminal_get_text(VteTerminal *terminal,
......
......@@ -166,7 +166,7 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text,
{
VteTerminal *terminal;
VteTerminalAccessiblePrivate *priv;
struct vte_char_attributes attrs;
struct _VteCharAttributes attrs;
char *next, *tmp;
long row, i, offset, caret;
long ccol, crow;
......@@ -249,7 +249,7 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text,
priv->snapshot_attributes = NULL;
}
priv->snapshot_attributes = g_array_new(FALSE, TRUE,
sizeof(struct vte_char_attributes));
sizeof(struct _VteCharAttributes));
/* Free the linebreak offsets and allocate a new array to hold
* them. */
......@@ -290,7 +290,7 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text,
offset = g_array_index(priv->snapshot_characters,
int, i);
attrs = g_array_index(priv->snapshot_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
offset);
/* If this character is on a row different from the row
* the character we looked at previously was on, then
......@@ -327,7 +327,7 @@ vte_terminal_accessible_update_private_data_if_needed(AtkObject *text,
offset = g_array_index(priv->snapshot_characters,
int, i);
attrs = g_array_index(priv->snapshot_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
offset);
/* If this cell is "before" the cursor, move the
* caret to be "here". */
......@@ -458,7 +458,7 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
gpointer data)
{
VteTerminalAccessiblePrivate *priv;
struct vte_char_attributes attr;
struct _VteCharAttributes attr;
long i, len, delta;
g_return_if_fail(VTE_IS_TERMINAL_ACCESSIBLE(data));
......@@ -499,7 +499,7 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
if (priv->snapshot_attributes != NULL) {
if (priv->snapshot_attributes->len > 0) {
attr = g_array_index(priv->snapshot_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
0);
delta = attr.row;
}
......@@ -511,7 +511,7 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
/* Find the first byte that scrolled off. */
for (i = 0; i < priv->snapshot_attributes->len; i++) {
attr = g_array_index(priv->snapshot_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
i);
if (attr.row >= delta + terminal->row_count - howmuch) {
break;
......@@ -549,7 +549,7 @@ vte_terminal_accessible_text_scrolled(VteTerminal *terminal,
/* Find the first byte that wasn't scrolled off the top. */
for (i = 0; i < priv->snapshot_attributes->len; i++) {
attr = g_array_index(priv->snapshot_attributes,
struct vte_char_attributes,
struct _VteCharAttributes,
i);
if (attr.row >= delta + howmuch) {
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment