main.c
来自「Linux 下察看 Chm 文件 的 源码」· C语言 代码 · 共 56 行
C
56 行
/*************************************************************************** * Copyright (C) 2003 by zhong * * zhongz@163.com * * * * 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. * ***************************************************************************/#include <gtk/gtk.h>// #include <pthread.h>#include "interface.h"#include "startup.h"extern void chmsee_go_ex_chm_file(ChmSee *window, const gchar *filename);extern void command_delete_tmpdir(char *s_path);intmain (int argc, char *argv[]){ const gchar *filename = NULL;// pthread_t popup_tid; gtk_set_locale ();// if(!g_thread_supported()) g_thread_init(NULL);// gdk_threads_init(); gtk_init (&argc, &argv); ChmSee *window; if (argv[1]) { filename = g_strdup_printf("%s", argv[1]); } window = create_main_window (); if (filename) {// gdk_threads_enter();// pthread_create(&popup_tid, NULL, chmsee_startup_popup_new, NULL); chmsee_startup_popup_new(); chmsee_go_ex_chm_file(window, filename);// gdk_threads_leave(); } // gtk_window_reshow_with_initial_size(GTK_WINDOW(window->chmsee_window)); gtk_widget_show(window->chmsee_window); gtk_window_maximize (GTK_WINDOW(window->chmsee_window)); gtk_main (); command_delete_tmpdir(window->tmpdir); return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?