Removed underscores from the beginnings of structure members
parent
97c895cd70
commit
4cf32848c9
|
@ -255,7 +255,7 @@ void moo_term_cursor_moved (MooTerm *term,
|
|||
new_row = buf_cursor_row (buf);
|
||||
new_col = buf_cursor_col (buf);
|
||||
|
||||
if (term->priv->_cursor_visible && term->priv->_blink_cursor_visible)
|
||||
if (term->priv->cursor_visible && term->priv->blink_cursor_visible)
|
||||
{
|
||||
invalidate_screen_cell (term,
|
||||
term->priv->cursor_row,
|
||||
|
@ -504,7 +504,7 @@ static void term_draw_range (MooTerm *term,
|
|||
g_assert (start + len <= term->priv->width);
|
||||
g_assert (abs_row < buf_total_height (term->priv->buffer));
|
||||
|
||||
if (term->priv->_cursor_visible && term->priv->_blink_cursor_visible &&
|
||||
if (term->priv->cursor_visible && term->priv->blink_cursor_visible &&
|
||||
term->priv->cursor_row + buf_scrollback (term->priv->buffer) == abs_row)
|
||||
{
|
||||
guint cursor = buf_cursor_col (term->priv->buffer);
|
||||
|
@ -920,7 +920,7 @@ void moo_term_invert_colors (MooTerm *term,
|
|||
void moo_term_set_cursor_visible (MooTerm *term,
|
||||
gboolean visible)
|
||||
{
|
||||
term->priv->_cursor_visible = visible;
|
||||
term->priv->cursor_visible = visible;
|
||||
invalidate_screen_cell (term,
|
||||
term->priv->cursor_row,
|
||||
term->priv->cursor_col);
|
||||
|
@ -929,8 +929,8 @@ void moo_term_set_cursor_visible (MooTerm *term,
|
|||
|
||||
static gboolean blink (MooTerm *term)
|
||||
{
|
||||
term->priv->_blink_cursor_visible =
|
||||
!term->priv->_blink_cursor_visible;
|
||||
term->priv->blink_cursor_visible =
|
||||
!term->priv->blink_cursor_visible;
|
||||
invalidate_screen_cell (term,
|
||||
term->priv->cursor_row,
|
||||
term->priv->cursor_col);
|
||||
|
@ -940,9 +940,9 @@ static gboolean blink (MooTerm *term)
|
|||
|
||||
static void start_cursor_blinking (MooTerm *term)
|
||||
{
|
||||
if (!term->priv->_cursor_blink_timeout_id && term->priv->_cursor_blinks)
|
||||
term->priv->_cursor_blink_timeout_id =
|
||||
g_timeout_add (term->priv->_cursor_blink_time,
|
||||
if (!term->priv->cursor_blink_timeout_id && term->priv->cursor_blinks)
|
||||
term->priv->cursor_blink_timeout_id =
|
||||
g_timeout_add (term->priv->cursor_blink_time,
|
||||
(GSourceFunc) blink,
|
||||
term);
|
||||
}
|
||||
|
@ -950,11 +950,11 @@ static void start_cursor_blinking (MooTerm *term)
|
|||
|
||||
static void stop_cursor_blinking (MooTerm *term)
|
||||
{
|
||||
if (term->priv->_cursor_blink_timeout_id)
|
||||
if (term->priv->cursor_blink_timeout_id)
|
||||
{
|
||||
g_source_remove (term->priv->_cursor_blink_timeout_id);
|
||||
term->priv->_cursor_blink_timeout_id = 0;
|
||||
term->priv->_blink_cursor_visible = TRUE;
|
||||
g_source_remove (term->priv->cursor_blink_timeout_id);
|
||||
term->priv->cursor_blink_timeout_id = 0;
|
||||
term->priv->blink_cursor_visible = TRUE;
|
||||
invalidate_screen_cell (term,
|
||||
term->priv->cursor_row,
|
||||
term->priv->cursor_col);
|
||||
|
@ -964,7 +964,7 @@ static void stop_cursor_blinking (MooTerm *term)
|
|||
|
||||
void moo_term_pause_cursor_blinking (MooTerm *term)
|
||||
{
|
||||
if (term->priv->_cursor_blinks)
|
||||
if (term->priv->cursor_blinks)
|
||||
{
|
||||
stop_cursor_blinking (term);
|
||||
start_cursor_blinking (term);
|
||||
|
@ -975,7 +975,7 @@ void moo_term_pause_cursor_blinking (MooTerm *term)
|
|||
void moo_term_set_cursor_blinks (MooTerm *term,
|
||||
gboolean blinks)
|
||||
{
|
||||
term->priv->_cursor_blinks = blinks;
|
||||
term->priv->cursor_blinks = blinks;
|
||||
if (blinks)
|
||||
start_cursor_blinking (term);
|
||||
else
|
||||
|
|
|
@ -72,8 +72,8 @@ struct _MooTermPrivate {
|
|||
guint8 modes[MODE_MAX];
|
||||
guint8 saved_modes[MODE_MAX];
|
||||
|
||||
gboolean _scrolled;
|
||||
guint _top_line;
|
||||
gboolean scrolled;
|
||||
guint top_line;
|
||||
guint width;
|
||||
guint height;
|
||||
|
||||
|
@ -103,12 +103,12 @@ struct _MooTermPrivate {
|
|||
PangoLayout *layout;
|
||||
guint pending_expose;
|
||||
gboolean colors_inverted;
|
||||
gboolean _cursor_visible;
|
||||
gboolean cursor_visible;
|
||||
|
||||
gboolean _blink_cursor_visible;
|
||||
gboolean _cursor_blinks;
|
||||
guint _cursor_blink_time;
|
||||
guint _cursor_blink_timeout_id;
|
||||
gboolean blink_cursor_visible;
|
||||
gboolean cursor_blinks;
|
||||
guint cursor_blink_time;
|
||||
guint cursor_blink_timeout_id;
|
||||
|
||||
GdkGC *color[2][MOO_TERM_COLOR_MAX];
|
||||
GdkGC *fg[2];
|
||||
|
@ -140,8 +140,8 @@ struct _MooTermPrivate {
|
|||
};
|
||||
|
||||
#define term_top_line(term) \
|
||||
((term)->priv->_scrolled ? \
|
||||
(term)->priv->_top_line : \
|
||||
((term)->priv->scrolled ? \
|
||||
(term)->priv->top_line : \
|
||||
buf_scrollback ((term)->priv->buffer))
|
||||
|
||||
void moo_term_text_iface_init (gpointer iface);
|
||||
|
|
|
@ -251,11 +251,11 @@ static void moo_term_init (MooTerm *term)
|
|||
|
||||
term->priv->selection = moo_term_selection_new (term);
|
||||
|
||||
term->priv->_cursor_visible = TRUE;
|
||||
term->priv->_blink_cursor_visible = TRUE;
|
||||
term->priv->_cursor_blinks = FALSE;
|
||||
term->priv->_cursor_blink_timeout_id = 0;
|
||||
term->priv->_cursor_blink_time = 530;
|
||||
term->priv->cursor_visible = TRUE;
|
||||
term->priv->blink_cursor_visible = TRUE;
|
||||
term->priv->cursor_blinks = FALSE;
|
||||
term->priv->cursor_blink_timeout_id = 0;
|
||||
term->priv->cursor_blink_time = 530;
|
||||
|
||||
term->priv->settings.hide_pointer_on_keypress = TRUE;
|
||||
term->priv->settings.meta_sends_escape = TRUE;
|
||||
|
@ -320,8 +320,8 @@ static void moo_term_finalize (GObject *object)
|
|||
guint i, j;
|
||||
MooTerm *term = MOO_TERM (object);
|
||||
|
||||
if (term->priv->_cursor_blink_timeout_id)
|
||||
g_source_remove (term->priv->_cursor_blink_timeout_id);
|
||||
if (term->priv->cursor_blink_timeout_id)
|
||||
g_source_remove (term->priv->cursor_blink_timeout_id);
|
||||
|
||||
moo_term_release_selection (term);
|
||||
|
||||
|
@ -399,7 +399,7 @@ static void moo_term_get_property (GObject *object,
|
|||
|
||||
switch (prop_id) {
|
||||
case PROP_CURSOR_BLINKS:
|
||||
g_value_set_boolean (value, term->priv->_cursor_blinks);
|
||||
g_value_set_boolean (value, term->priv->cursor_blinks);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -577,7 +577,7 @@ static void scrollback_changed (MooTerm *term,
|
|||
{
|
||||
guint scrollback = buf_scrollback (term->priv->buffer);
|
||||
|
||||
if (term->priv->_scrolled && term->priv->_top_line > scrollback)
|
||||
if (term->priv->scrolled && term->priv->top_line > scrollback)
|
||||
{
|
||||
moo_term_selection_invalidate (term);
|
||||
scroll_to_bottom (term, TRUE);
|
||||
|
@ -613,7 +613,7 @@ static void height_changed (MooTerm *term,
|
|||
|
||||
term->priv->height = buf_screen_height (term->priv->buffer);
|
||||
|
||||
if (!term->priv->_scrolled || term->priv->_top_line > scrollback)
|
||||
if (!term->priv->scrolled || term->priv->top_line > scrollback)
|
||||
scroll_to_bottom (term, TRUE);
|
||||
else
|
||||
update_adjustment (term);
|
||||
|
@ -778,8 +778,8 @@ static void scroll_abs (MooTerm *term,
|
|||
if (line >= buf_scrollback (term->priv->buffer))
|
||||
return scroll_to_bottom (term, update_adj);
|
||||
|
||||
term->priv->_top_line = line;
|
||||
term->priv->_scrolled = TRUE;
|
||||
term->priv->top_line = line;
|
||||
term->priv->scrolled = TRUE;
|
||||
|
||||
moo_term_invalidate_all (term);
|
||||
|
||||
|
@ -794,20 +794,20 @@ static void scroll_to_bottom (MooTerm *term,
|
|||
guint scrollback = buf_scrollback (term->priv->buffer);
|
||||
gboolean update_full = FALSE;
|
||||
|
||||
if (!term->priv->_scrolled && term->priv->_top_line <= scrollback)
|
||||
if (!term->priv->scrolled && term->priv->top_line <= scrollback)
|
||||
{
|
||||
if (update_adj)
|
||||
update_adjustment_value (term);
|
||||
return;
|
||||
}
|
||||
|
||||
if (term->priv->_top_line > scrollback)
|
||||
if (term->priv->top_line > scrollback)
|
||||
{
|
||||
term->priv->_top_line = scrollback;
|
||||
term->priv->top_line = scrollback;
|
||||
update_full = TRUE;
|
||||
}
|
||||
|
||||
term->priv->_scrolled = FALSE;
|
||||
term->priv->scrolled = FALSE;
|
||||
|
||||
moo_term_invalidate_all (term);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ struct _MooTermBufferPrivate {
|
|||
|
||||
/* these are real position and
|
||||
dimensions of the screen */
|
||||
guint _screen_offset;
|
||||
guint screen_offset;
|
||||
guint screen_width;
|
||||
guint screen_height;
|
||||
|
||||
|
@ -137,7 +137,7 @@ inline static guint buf_scrollback (MooTermBuffer *buf)
|
|||
if (buf_get_mode (MODE_CA))
|
||||
return 0;
|
||||
else
|
||||
return buf->priv->_screen_offset;
|
||||
return buf->priv->screen_offset;
|
||||
}
|
||||
|
||||
inline static guint buf_total_height (MooTermBuffer *buf)
|
||||
|
@ -225,7 +225,7 @@ inline static MooTermLine *buf_screen_line (MooTermBuffer *buf,
|
|||
g_assert (n < buf->priv->screen_height);
|
||||
|
||||
return g_ptr_array_index (buf->priv->lines,
|
||||
n + buf->priv->_screen_offset);
|
||||
n + buf->priv->screen_offset);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -255,7 +255,7 @@ static GObject *moo_term_buffer_constructor (GType type,
|
|||
buf->priv->screen_width = MIN_TERMINAL_WIDTH;
|
||||
if (buf->priv->screen_height < MIN_TERMINAL_HEIGHT)
|
||||
buf->priv->screen_height = MIN_TERMINAL_HEIGHT;
|
||||
buf->priv->_screen_offset = 0;
|
||||
buf->priv->screen_offset = 0;
|
||||
|
||||
buf->priv->top_margin = 0;
|
||||
buf->priv->bottom_margin = buf->priv->screen_height - 1;
|
||||
|
@ -413,7 +413,7 @@ void moo_term_buffer_set_screen_height (MooTermBuffer *buf,
|
|||
|
||||
remove -= del;
|
||||
|
||||
buf->priv->_screen_offset += remove;
|
||||
buf->priv->screen_offset += remove;
|
||||
buf_changed_set_all (buf);
|
||||
scrollback_changed = TRUE;
|
||||
content_changed = TRUE;
|
||||
|
@ -945,16 +945,16 @@ void moo_term_buffer_index (MooTermBuffer *buf)
|
|||
|
||||
if (buf_get_mode (MODE_CA) || buf->priv->scrolling_region_set)
|
||||
{
|
||||
guint top = buf->priv->top_margin + buf->priv->_screen_offset;
|
||||
guint bottom = buf->priv->bottom_margin + buf->priv->_screen_offset;
|
||||
guint cursor = cursor_row + buf->priv->_screen_offset;
|
||||
guint top = buf->priv->top_margin + buf->priv->screen_offset;
|
||||
guint bottom = buf->priv->bottom_margin + buf->priv->screen_offset;
|
||||
guint cursor = cursor_row + buf->priv->screen_offset;
|
||||
|
||||
if (cursor > bottom || cursor < top)
|
||||
{
|
||||
g_warning ("got IND outside of scrolling region");
|
||||
moo_term_buffer_cursor_move_to (buf, buf->priv->top_margin, 0);
|
||||
cursor_row = buf_cursor_row (buf);
|
||||
cursor = cursor_row + buf->priv->_screen_offset;
|
||||
cursor = cursor_row + buf->priv->screen_offset;
|
||||
}
|
||||
|
||||
if (cursor == bottom)
|
||||
|
@ -988,7 +988,7 @@ void moo_term_buffer_index (MooTermBuffer *buf)
|
|||
g_ptr_array_add (buf->priv->lines,
|
||||
moo_term_line_new (width));
|
||||
|
||||
buf->priv->_screen_offset += 1;
|
||||
buf->priv->screen_offset += 1;
|
||||
moo_term_buffer_scrollback_changed (buf);
|
||||
|
||||
buf_changed_set_all (buf);
|
||||
|
@ -1006,9 +1006,9 @@ void moo_term_buffer_index (MooTermBuffer *buf)
|
|||
void moo_term_buffer_reverse_index (MooTermBuffer *buf)
|
||||
{
|
||||
guint width = buf_screen_width (buf);
|
||||
guint top = buf->priv->top_margin + buf->priv->_screen_offset;
|
||||
guint bottom = buf->priv->bottom_margin + buf->priv->_screen_offset;
|
||||
guint cursor = buf_cursor_row (buf) + buf->priv->_screen_offset;
|
||||
guint top = buf->priv->top_margin + buf->priv->screen_offset;
|
||||
guint bottom = buf->priv->bottom_margin + buf->priv->screen_offset;
|
||||
guint cursor = buf_cursor_row (buf) + buf->priv->screen_offset;
|
||||
|
||||
g_assert (cursor <= bottom && cursor >= top);
|
||||
|
||||
|
@ -1361,9 +1361,9 @@ void moo_term_buffer_cup (MooTermBuffer *buf,
|
|||
void moo_term_buffer_delete_line (MooTermBuffer *buf,
|
||||
guint n)
|
||||
{
|
||||
guint cursor = buf->priv->cursor_row + buf->priv->_screen_offset;
|
||||
guint top = buf->priv->top_margin + buf->priv->_screen_offset;
|
||||
guint bottom = buf->priv->bottom_margin + buf->priv->_screen_offset;
|
||||
guint cursor = buf->priv->cursor_row + buf->priv->screen_offset;
|
||||
guint top = buf->priv->top_margin + buf->priv->screen_offset;
|
||||
guint bottom = buf->priv->bottom_margin + buf->priv->screen_offset;
|
||||
guint i;
|
||||
|
||||
GdkRectangle changed = {
|
||||
|
@ -1400,9 +1400,9 @@ void moo_term_buffer_delete_line (MooTermBuffer *buf,
|
|||
void moo_term_buffer_insert_line (MooTermBuffer *buf,
|
||||
guint n)
|
||||
{
|
||||
guint cursor = buf->priv->cursor_row + buf->priv->_screen_offset;
|
||||
guint top = buf->priv->top_margin + buf->priv->_screen_offset;
|
||||
guint bottom = buf->priv->bottom_margin + buf->priv->_screen_offset;
|
||||
guint cursor = buf->priv->cursor_row + buf->priv->screen_offset;
|
||||
guint top = buf->priv->top_margin + buf->priv->screen_offset;
|
||||
guint bottom = buf->priv->bottom_margin + buf->priv->screen_offset;
|
||||
guint i;
|
||||
|
||||
GdkRectangle changed = {
|
||||
|
@ -1520,7 +1520,7 @@ void moo_term_buffer_reset (MooTermBuffer *buf)
|
|||
moo_term_line_free (g_ptr_array_index (buf->priv->lines, i));
|
||||
g_ptr_array_free (buf->priv->lines, TRUE);
|
||||
|
||||
buf->priv->_screen_offset = 0;
|
||||
buf->priv->screen_offset = 0;
|
||||
buf->priv->lines = g_ptr_array_sized_new (buf->priv->screen_height);
|
||||
for (i = 0; i < buf->priv->screen_height; ++i)
|
||||
g_ptr_array_add (buf->priv->lines,
|
||||
|
@ -1746,11 +1746,11 @@ MooTermLine *moo_term_buffer_get_line (MooTermBuffer *buf,
|
|||
{
|
||||
g_assert (n < buf->priv->screen_height);
|
||||
return g_ptr_array_index (buf->priv->lines,
|
||||
n + buf->priv->_screen_offset);
|
||||
n + buf->priv->screen_offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_assert (n < buf->priv->_screen_offset + buf->priv->screen_height);
|
||||
g_assert (n < buf->priv->screen_offset + buf->priv->screen_height);
|
||||
return g_ptr_array_index (buf->priv->lines, n);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue