本文整理汇总了C++中repaint_screen函数的典型用法代码示例。如果您正苦于以下问题:C++ repaint_screen函数的具体用法?C++ repaint_screen怎么用?C++ repaint_screen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了repaint_screen函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: view_file_at_line
int
view_file_at_line (const char *filename, int plain_view, int internal,
int start_line)
{
static const char *viewer = NULL;
int move_dir = 0;
if (plain_view) {
int changed_hex_mode = 0;
int changed_nroff_flag = 0;
int changed_magic_flag = 0;
altered_hex_mode = 0;
altered_nroff_flag = 0;
altered_magic_flag = 0;
if (default_hex_mode)
changed_hex_mode = 1;
if (default_nroff_flag)
changed_nroff_flag = 1;
if (default_magic_flag)
changed_magic_flag = 1;
default_hex_mode = 0;
default_nroff_flag = 0;
default_magic_flag = 0;
mc_internal_viewer (NULL, filename, &move_dir, start_line);
if (changed_hex_mode && !altered_hex_mode)
default_hex_mode = 1;
if (changed_nroff_flag && !altered_nroff_flag)
default_nroff_flag = 1;
if (changed_magic_flag && !altered_magic_flag)
default_magic_flag = 1;
repaint_screen ();
return move_dir;
}
if (internal) {
char view_entry[BUF_TINY];
if (start_line != 0)
g_snprintf (view_entry, sizeof (view_entry), "View:%d",
start_line);
else
strcpy (view_entry, "View");
if (regex_command (filename, view_entry, &move_dir) == 0) {
mc_internal_viewer (NULL, filename, &move_dir, start_line);
repaint_screen ();
}
} else {
if (!viewer) {
viewer = getenv ("VIEWER");
if (!viewer)
viewer = getenv ("PAGER");
if (!viewer)
viewer = "view";
}
execute_with_vfs_arg (viewer, filename);
}
return move_dir;
}
开发者ID:ebichu,项目名称:dd-wrt,代码行数:60,代码来源:cmd.c
示例2: chown_done
static void
chown_done (void)
{
if (need_update)
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
开发者ID:LubkaB,项目名称:mc,代码行数:7,代码来源:chown.c
示例3: mkdir_cmd
void
mkdir_cmd (void)
{
char *tempdir;
char *dir;
dir =
input_expand_dialog (_("Create a new Directory"),
_(" Enter directory name:"), "");
if (!dir || !*dir)
return;
if (dir[0] == '/' || dir[0] == '~')
tempdir = g_strdup (dir);
else
tempdir = concat_dir_and_file (current_panel->cwd, dir);
g_free (dir);
save_cwds_stat ();
if (my_mkdir (tempdir, 0777) == 0) {
update_panels (UP_OPTIMIZE, tempdir);
repaint_screen ();
select_item (current_panel);
g_free (tempdir);
return;
}
g_free (tempdir);
message (1, MSG_ERROR, " %s ", unix_error_string (errno));
}
开发者ID:GalaxyTab4,项目名称:workbench,代码行数:30,代码来源:cmd.c
示例4: edit_file_at_line
void
edit_file_at_line (const vfs_path_t * what_vpath, gboolean internal, long start_line)
{
#ifdef USE_INTERNAL_EDIT
if (internal)
edit_file (what_vpath, start_line);
else
#endif /* USE_INTERNAL_EDIT */
{
static const char *editor = NULL;
(void) internal;
if (editor == NULL)
{
editor = getenv ("EDITOR");
if (editor == NULL)
editor = get_default_editor ();
}
execute_external_editor_or_viewer (editor, what_vpath, start_line);
}
if (mc_global.mc_run_mode == MC_RUN_FULL)
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
#ifdef USE_INTERNAL_EDIT
if (use_internal_edit)
dialog_switch_process_pending ();
else
#endif /* USE_INTERNAL_EDIT */
repaint_screen ();
}
开发者ID:NoSeungHwan,项目名称:mc_kor_dev,代码行数:34,代码来源:cmd.c
示例5: swap_cmd
void
swap_cmd (void)
{
swap_panels ();
tty_touch_screen ();
repaint_screen ();
}
开发者ID:NoSeungHwan,项目名称:mc_kor_dev,代码行数:7,代码来源:cmd.c
示例6: post_exec
/** Hide the terminal after executing a program */
void
post_exec (void)
{
edition_post_exec ();
use_dash (TRUE);
repaint_screen ();
}
开发者ID:LubkaB,项目名称:mc,代码行数:8,代码来源:execute.c
示例7: display_bits_box
void
display_bits_box (void)
{
const char *cpname;
new_display_codepage = mc_global.display_codepage;
cpname = (new_display_codepage < 0) ? _("Other 8 bit")
: ((codepage_desc *) g_ptr_array_index (codepages, new_display_codepage))->name;
{
int new_meta;
quick_widget_t quick_widgets[] = {
/* *INDENT-OFF* */
QUICK_START_COLUMNS,
QUICK_LABEL (N_("Input / display codepage:"), NULL),
QUICK_NEXT_COLUMN,
QUICK_BUTTON (cpname, B_USER, sel_charset_button, NULL),
QUICK_STOP_COLUMNS,
QUICK_SEPARATOR (TRUE),
QUICK_CHECKBOX (N_("F&ull 8 bits input"), &new_meta, NULL),
QUICK_BUTTONS_OK_CANCEL,
QUICK_END
/* *INDENT-ON* */
};
quick_dialog_t qdlg = {
-1, -1, 46,
N_("Display bits"), "[Display bits]",
quick_widgets, NULL, NULL
};
new_meta = !use_8th_bit_as_meta;
application_keypad_mode ();
if (quick_dialog (&qdlg) == B_ENTER)
{
char *errmsg;
mc_global.display_codepage = new_display_codepage;
errmsg = init_translation_table (mc_global.source_codepage, mc_global.display_codepage);
if (errmsg != NULL)
{
message (D_ERROR, MSG_ERROR, "%s", errmsg);
g_free (errmsg);
}
#ifdef HAVE_SLANG
tty_display_8bit (mc_global.display_codepage != 0 && mc_global.display_codepage != 1);
#else
tty_display_8bit (mc_global.display_codepage != 0);
#endif
use_8th_bit_as_meta = !new_meta;
repaint_screen ();
}
}
}
开发者ID:ActionLuzifer,项目名称:mc,代码行数:60,代码来源:boxes.c
示例8: mkdir_cmd
void
mkdir_cmd (void)
{
char *dir, *absdir;
dir =
input_expand_dialog (_("Create a new Directory"),
_(" Enter directory name:"),
MC_HISTORY_FM_MKDIR, "");
if (!dir)
return;
if (dir[0] == '/' || dir[0] == '~')
absdir = g_strdup (dir);
else
absdir = mhl_str_dir_plus_file (current_panel->cwd, dir);
save_cwds_stat ();
if (my_mkdir (absdir, 0777) == 0) {
update_panels (UP_OPTIMIZE, dir);
repaint_screen ();
select_item (current_panel);
} else {
message (1, MSG_ERROR, " %s ", unix_error_string (errno));
}
g_free (absdir);
g_free (dir);
}
开发者ID:ebichu,项目名称:dd-wrt,代码行数:29,代码来源:cmd.c
示例9: display_bits_box
void
display_bits_box (void)
{
Dlg_head *dbits_dlg;
new_display_codepage = display_codepage;
application_keypad_mode ();
dbits_dlg = init_disp_bits_box ();
run_dlg (dbits_dlg);
if (dbits_dlg->ret_value == B_ENTER) {
const char *errmsg;
display_codepage = new_display_codepage;
errmsg =
init_translation_table (source_codepage, display_codepage);
if (errmsg)
message (1, MSG_ERROR, "%s", errmsg);
#ifndef HAVE_SLANG
meta (stdscr, display_codepage != 0);
#else
SLsmg_Display_Eight_Bit = (display_codepage != 0
&& display_codepage != 1) ? 128 : 160;
#endif
use_8th_bit_as_meta = !(inpcheck->state & C_BOOL);
}
destroy_dlg (dbits_dlg);
repaint_screen ();
}
开发者ID:GalaxyTab4,项目名称:workbench,代码行数:29,代码来源:boxes.c
示例10: edit_symlink_cmd
void
edit_symlink_cmd (void)
{
if (S_ISLNK (selection (current_panel)->st.st_mode))
{
char buffer[MC_MAXPATHLEN];
char *p = NULL;
int i;
char *q;
vfs_path_t *p_vpath;
p = selection (current_panel)->fname;
p_vpath = vfs_path_from_str (p);
q = g_strdup_printf (_("Symlink '%s\' points to:"), str_trunc (p, 32));
i = readlink (p, buffer, MC_MAXPATHLEN - 1);
if (i > 0)
{
char *dest;
buffer[i] = 0;
dest =
input_expand_dialog (_("Edit symlink"), q, MC_HISTORY_FM_EDIT_LINK, buffer,
INPUT_COMPLETE_FILENAMES);
if (dest)
{
if (*dest && strcmp (buffer, dest))
{
save_cwds_stat ();
if (mc_unlink (p_vpath) == -1)
{
message (D_ERROR, MSG_ERROR, _("edit symlink, unable to remove %s: %s"),
p, unix_error_string (errno));
}
else
{
vfs_path_t *dest_vpath;
dest_vpath = vfs_path_from_str_flags (dest, VPF_NO_CANON);
if (mc_symlink (dest_vpath, p_vpath) == -1)
message (D_ERROR, MSG_ERROR, _("edit symlink: %s"),
unix_error_string (errno));
vfs_path_free (dest_vpath);
}
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
g_free (dest);
}
}
g_free (q);
vfs_path_free (p_vpath);
}
else
{
message (D_ERROR, MSG_ERROR, _("'%s' is not a symbolic link"),
selection (current_panel)->fname);
}
}
开发者ID:NoSeungHwan,项目名称:mc_kor_dev,代码行数:60,代码来源:cmd.c
示例11: do_view_cmd
/**
* Run viewer (internal or external) on the currently selected file.
* If normal is TRUE, force internal viewer and raw mode (used for F13).
*/
static void
do_view_cmd (gboolean normal)
{
/* Directories are viewed by changing to them */
if (S_ISDIR (selection (current_panel)->st.st_mode) || link_isdir (selection (current_panel)))
{
vfs_path_t *fname_vpath;
if (confirm_view_dir && (current_panel->marked || current_panel->dirs_marked))
{
if (query_dialog
(_("Confirmation"), _("Files tagged, want to cd?"), D_NORMAL, 2,
_("&Yes"), _("&No")) != 0)
{
return;
}
}
fname_vpath = vfs_path_from_str (selection (current_panel)->fname);
if (!do_cd (fname_vpath, cd_exact))
message (D_ERROR, MSG_ERROR, _("Cannot change directory"));
vfs_path_free (fname_vpath);
}
else
{
int file_idx;
vfs_path_t *filename_vpath;
file_idx = current_panel->selected;
filename_vpath = vfs_path_from_str (current_panel->dir.list[file_idx].fname);
view_file (filename_vpath, normal, use_internal_view != 0);
vfs_path_free (filename_vpath);
}
repaint_screen ();
}
开发者ID:NoSeungHwan,项目名称:mc_kor_dev,代码行数:39,代码来源:cmd.c
示例12: listmode_done
static void listmode_done (void)
{
destroy_dlg (listmode_dlg);
if (0)
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
开发者ID:OS2World,项目名称:UTIL-SHELL-Midnight_Commander,代码行数:7,代码来源:listmode.c
示例13: chown_advanced_done
static void
chown_advanced_done (void)
{
g_free (sf_stat);
if (need_update)
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
开发者ID:jskDr,项目名称:mc,代码行数:8,代码来源:achown.c
示例14: ren_cmd_local
/* Invoked by F16. Move/rename, default to the same panel. */
void ren_cmd_local (void)
{
save_cwds_stat ();
if (panel_operate (current_panel, OP_MOVE, 1)){
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
}
开发者ID:GalaxyTab4,项目名称:workbench,代码行数:9,代码来源:cmd.c
示例15: listmode_done
static void
listmode_done (WDialog * h)
{
dlg_destroy (h);
if (0)
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
开发者ID:Distrotech,项目名称:mc,代码行数:8,代码来源:listmode.c
示例16: delete_cmd
void delete_cmd (void)
{
save_cwds_stat ();
if (panel_operate (current_panel, OP_DELETE, 0)){
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
}
开发者ID:GalaxyTab4,项目名称:workbench,代码行数:9,代码来源:cmd.c
示例17: copy_cmd_local
void
copy_cmd_local (void)
{
save_cwds_stat ();
if (panel_operate (current_panel, OP_COPY, TRUE))
{
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
}
开发者ID:NoSeungHwan,项目名称:mc_kor_dev,代码行数:10,代码来源:cmd.c
示例18: do_edit_at_line
void do_edit_at_line (const char *what, int start_line)
{
static const char *editor = NULL;
#ifdef USE_INTERNAL_EDIT
if (use_internal_edit){
edit_file (what, start_line);
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
return;
}
#endif /* USE_INTERNAL_EDIT */
if (!editor){
editor = getenv ("EDITOR");
if (!editor)
editor = get_default_editor ();
}
execute_with_vfs_arg (editor, what);
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
repaint_screen ();
}
开发者ID:GalaxyTab4,项目名称:workbench,代码行数:21,代码来源:cmd.c
示例19: reread_cmd
void
reread_cmd (void)
{
panel_update_flags_t flag = UP_ONLY_CURRENT;
if (get_current_type () == view_listing && get_other_type () == view_listing &&
vfs_path_equal (current_panel->cwd_vpath, other_panel->cwd_vpath))
flag = UP_OPTIMIZE;
update_panels (UP_RELOAD | flag, UP_KEEPSEL);
repaint_screen ();
}
开发者ID:NoSeungHwan,项目名称:mc_kor_dev,代码行数:12,代码来源:cmd.c
示例20: refresh_cmd
static void
refresh_cmd (void)
{
#ifdef HAVE_SLANG
tty_touch_screen ();
mc_refresh ();
#else
/* Use this if the refreshes fail */
clr_scr ();
repaint_screen ();
#endif /* HAVE_SLANG */
}
开发者ID:GalaxyTab4,项目名称:workbench,代码行数:12,代码来源:dialog.c
注:本文中的repaint_screen函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论