summaryrefslogtreecommitdiffstats
path: root/x11vnc/tkx11vnc.h
diff options
context:
space:
mode:
authorrunge <runge>2004-12-27 22:07:55 +0000
committerrunge <runge>2004-12-27 22:07:55 +0000
commit4b89306d17a56210cf7d8c4da93ff585b166b3fb (patch)
tree04285a15474058e923ad09253dfb923278806d53 /x11vnc/tkx11vnc.h
parentc9a69485ec824ee4ceeb7d9d8a8d4ee3693da574 (diff)
downloadlibtdevnc-4b89306d17a56210cf7d8c4da93ff585b166b3fb.tar.gz
libtdevnc-4b89306d17a56210cf7d8c4da93ff585b166b3fb.zip
x11vnc: improve XFIXES cursor transparency, more remote-control cmds.
Diffstat (limited to 'x11vnc/tkx11vnc.h')
-rw-r--r--x11vnc/tkx11vnc.h187
1 files changed, 149 insertions, 38 deletions
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index ddd5f23..cf4beb7 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -95,6 +95,7 @@
" gone:\n"
" vncconnect\n"
" --\n"
+" http\n"
" =F httpdir:\n"
" httpport:\n"
" enablehttpproxy\n"
@@ -173,6 +174,8 @@
" debug_pointer\n"
" debug_keyboard\n"
" =F logfile:\n"
+" =GA show-logfile\n"
+" =GA tail-logfile\n"
" quiet\n"
" --\n"
" =GA show-start-cmd\n"
@@ -193,9 +196,9 @@
" --\n"
" =RA noremote\n"
" --\n"
-" alwaysshared\n"
-" nevershared\n"
-" dontdisconnect\n"
+" =SA alwaysshared\n"
+" =SA nevershared\n"
+" =SA dontdisconnect\n"
" --\n"
" viewpasswd:\n"
" =F passwdfile:\n"
@@ -210,6 +213,9 @@
" =-C:1,2,3,4 pointer_mode:\n"
" input_skip:\n"
" nodragging\n"
+" alphacut:\n"
+" alphafrac:\n"
+" alpharemove\n"
" --\n"
" =D noshm\n"
" flipbyteorder\n"
@@ -297,6 +303,15 @@
"Send the stop command to the x11vnc server, then terminate the tkx11vnc gui.\n"
"\"\n"
"\n"
+" set helptext(show-logfile) \"\n"
+"View the current contents of the logfile (if it exists and is accessible\n"
+"by the gui process).\n"
+"\"\n"
+"\n"
+" set helptext(tail-logfile) \"\n"
+"Run the tail(1) command with -f option on the logfile in an xterm.\n"
+"\"\n"
+"\n"
" set helptext(Quit) \"\n"
"Terminate the tkx11vnc gui. Any x11vnc servers will be left running.\n"
"\"\n"
@@ -398,6 +413,20 @@
" Anywhere: Control-p invokes \\\"Actions -> ping\\\"\n"
" Anywhere: Control-u and Control-r invoke \\\"Actions -> update-all\\\"\n"
"\n"
+"Misc:\n"
+"\n"
+"Since x11vnc has so many settings and to avoid further confusion,\n"
+"the libvncserver options:\n"
+"\n"
+" -alwaysshared\n"
+" -nevershared\n"
+" -dontdisconnect\n"
+"\n"
+"are not available for changing in a running x11vnc (even though it\n"
+"is feasible). These options overlap with the x11vnc options -shared\n"
+"and -forever which are hopefully enough for most usage. They may be\n"
+"specified for x11vnc startup if desired.\n"
+"\n"
"\"\n"
"}\n"
"\n"
@@ -512,8 +541,8 @@
"}\n"
"\n"
"proc help_win {item} {\n"
-" global helptext helpremote\n"
-" global query_ans query_aro;\n"
+" global helptext helpremote menu_var\n"
+" global query_ans query_aro\n"
"\n"
" set ok 0\n"
" set text \"Help on $item:\\n\\n\"\n"
@@ -557,6 +586,18 @@
" set ok 1\n"
" }\n"
"\n"
+" if {![is_action $item] && [info exists menu_var($item)]} {\n"
+" global unset_str\n"
+" append text \"\\n\\n\"\n"
+" append text \"==== current $item value: ====\\n\";\n"
+" append text \"\\n\"\n"
+" if {$menu_var($item) == \"\"} {\n"
+" append text \"$unset_str\\n\"\n"
+" } else {\n"
+" append text \"$menu_var($item)\\n\"\n"
+" }\n"
+" }\n"
+"\n"
" if {$item == \"start\"} {\n"
" set str [get_start_x11vnc_txt]\n"
" append text $str\n"
@@ -805,15 +846,20 @@
"# Entry box utilities:\n"
"proc entry_state {x state} {\n"
" global entry_box entry_label entry_ok entry_help entry_skip entry_browse\n"
+" global old_labels\n"
" if {$x == \"all\"} {\n"
-" $entry_label configure -state $state\n"
+" if {!$old_labels} {\n"
+" $entry_label configure -state $state\n"
+" }\n"
" $entry_box configure -state $state\n"
" $entry_ok configure -state $state\n"
" $entry_skip configure -state $state\n"
" $entry_help configure -state $state\n"
" $entry_browse configure -state $state\n"
" } elseif {$x == \"label\"} {\n"
-" $entry_label configure -state $state\n"
+" if {!$old_labels} {\n"
+" $entry_label configure -state $state\n"
+" }\n"
" } elseif {$x == \"box\"} {\n"
" $entry_box configure -state $state\n"
" } elseif {$x == \"ok\"} {\n"
@@ -1342,7 +1388,11 @@
"}\n"
"\n"
"proc set_info {str} {\n"
-" global info_str\n"
+" global info_str info_label\n"
+"#set w1 [$info_label cget -width]\n"
+"#set w2 [winfo width $info_label]\n"
+"#puts \"set_info: w=$w1 winfo=$w2\"\n"
+"#append_text \"$str\\n\"\n"
" set info_str \"$str\"\n"
" update\n"
"}\n"
@@ -1366,6 +1416,55 @@
" textwin \"Settings\" \"All Current Settings\" $txt\n"
"}\n"
"\n"
+"proc show_logfile {} {\n"
+" global menu_var unset_str\n"
+" set logfile $menu_var(logfile)\n"
+" \n"
+" if {$logfile == \"\" || $logfile == $unset_str} {\n"
+" set txt \"\\nNo logfile has been specified.\\n\\n\" \n"
+" } elseif {![file exists $logfile]} {\n"
+" set txt \"\\nLogfile \\\"$logfile\\\" does not exist.\\n\\n\"\n"
+" } else {\n"
+" set fh \"-3\"\n"
+" set err \"\"\n"
+" catch {set fh [open $logfile \"r\"]} err\n"
+" if {$fh == \"-3\"} {\n"
+" set txt \"\\nError opening \\\"$logfile\\\" $err.\\n\\n\"\n"
+" } else {\n"
+" set txt \"\\nLogfile \\\"$logfile\\\" current contents:\\n\"\n"
+" while {[gets $fh line] > -1} {\n"
+" append txt \"$line\\n\"\n"
+" }\n"
+" close $fh\n"
+" }\n"
+" }\n"
+" textwin \"Logfile\" \"Logfile\" $txt\n"
+"}\n"
+"\n"
+"proc tail_logfile {} {\n"
+" global menu_var unset_str\n"
+" set logfile $menu_var(logfile)\n"
+" \n"
+" set txt \"\"\n"
+" if {$logfile == \"\" || $logfile == $unset_str} {\n"
+" set txt \"\\nNo logfile has been specified.\\n\\n\" \n"
+" } elseif {![file exists $logfile]} {\n"
+" set txt \"\\nLogfile \\\"$logfile\\\" does not exist.\\n\\n\"\n"
+" } else {\n"
+" set cmd \"\"\n"
+" set xterm_cmd \"xterm -geometry 80x45 -title x11vnc-logfile -e\"\n"
+" set cmd [split $xterm_cmd]\n"
+" lappend cmd \"tail\"\n"
+" lappend cmd \"+1f\"\n"
+" lappend cmd $logfile\n"
+" lappend cmd \"&\"\n"
+" catch {[eval exec $cmd]}\n"
+" }\n"
+" if {$txt != \"\"} {\n"
+" textwin \"Logfile\" \"Logfile\" $txt\n"
+" }\n"
+"}\n"
+"\n"
"proc set_connected {yesno} {\n"
" global connected_to_x11vnc\n"
" set orig $connected_to_x11vnc\n"
@@ -1428,6 +1527,12 @@
" } elseif {$item == \"all-settings\"} {\n"
" show_all_settings\n"
" return\n"
+" } elseif {$item == \"show-logfile\"} {\n"
+" show_logfile\n"
+" return\n"
+" } elseif {$item == \"tail-logfile\"} {\n"
+" tail_logfile\n"
+" return\n"
" } elseif {$item == \"stop+quit\"} {\n"
" push_new_value \"stop\" \"stop\" 1 0\n"
" set_connected no\n"
@@ -1672,7 +1777,7 @@
" append_text \"Invalid client info string: $client\\n\"\n"
" return\n"
" }\n"
-" append msg \"*** To disconnect this client press \\\"OK\\\", otherwise press \\\"Skip\\\"\\n\"\n"
+" append msg \"*** To *DISCONNECT* this client press \\\"OK\\\", otherwise press \\\"Skip\\\"\\n\"\n"
" bell\n"
" if [warning_dialog $msg \"current\"] {\n"
" push_new_value \"disconnect\" \"disconnect\" $cid 1\n"
@@ -1763,17 +1868,19 @@
" global menu_b menu_m\n"
" global item_opts item_bool item_case item_entry menu_var unset_str\n"
" global item_cascade\n"
-" global info_str x11_display vnc_display\n"
+" global info_label info_str x11_display vnc_display\n"
" global text_area\n"
" global entry_box entry_str entry_set entry_label entry_ok entry_browse\n"
" global entry_help entry_skip\n"
" global bfont\n"
" global helptext helpremote helplabel\n"
"\n"
-"set v 0\n"
-" \n"
-" label .info -textvariable info_str -bd 2 -relief groove -anchor w \n"
-" pack .info -side top -fill x \n"
+" set label_width 80\n"
+"\n"
+" set info_label .info\n"
+" label $info_label -textvariable info_str -bd 2 -relief groove \\\n"
+" -anchor w -width $label_width\n"
+" pack $info_label -side top -fill x -expand 0\n"
"\n"
" # Extract the Rows:\n"
" set row 0;\n"
@@ -1875,7 +1982,7 @@
" set item_cascade($item) \"\"\n"
" set item_entry($item) $menu_count($case)\n"
"\n"
-"if {$v} { puts \"ITEM: $item - $opts - $case - $bool - $menu_count($case)\" }\n"
+" if {0} { puts \"ITEM: $item - $opts - $case - $bool - $menu_count($case)\" }\n"
"\n"
" set mvar 0 \n"
" set m $menu_m($case)\n"
@@ -1953,8 +2060,6 @@
" set m $menu_m($case);\n"
" set n [$m index end]\n"
"\n"
-"if {$v} { puts \"$case end: $n\" }\n"
-"\n"
" for {set i 0} {$i <= $n} {incr i} {\n"
" set type [$m type $i]\n"
" if {$type == \"separator\"} {\n"
@@ -1972,13 +2077,6 @@
" $m add command -label $str \\\n"
" -command \"menu_help $label\";\n"
"\n"
-"if {$v} {\n"
-" set ht \"\"; set hr \"\"\n"
-" if {[info exists helptext($label)]} { set ht \"YES\" }\n"
-" if {[info exists helpremote($label)]} { set hr \"YES\" }\n"
-" puts \"'$label'\\tht='$ht' hr='$hr'\"\n"
-"}\n"
-"\n"
" if {$str == \"\"} {\n"
" $m entryconfigure end -state disabled\n"
" }\n"
@@ -2000,11 +2098,13 @@
"\n"
" set df_x11 \"$df.xdisplay\"\n"
" no_x11_display\n"
-" label $df_x11 -textvariable x11_display -width 35 -anchor w\n"
+"\n"
+" set lw [expr {$label_width / 2}]\n"
+" label $df_x11 -textvariable x11_display -width $lw -anchor w\n"
"\n"
" set df_vnc \"$df.vdisplay\"\n"
" no_vnc_display\n"
-" label $df_vnc -textvariable vnc_display -width 35 -anchor w\n"
+" label $df_vnc -textvariable vnc_display -width $lw -anchor w\n"
"\n"
" pack $df_x11 $df_vnc -side left \n"
" pack $df -side top -fill x\n"
@@ -2022,7 +2122,7 @@
" set ef .entryframe\n"
" frame $ef -bd 1 -relief groove\n"
"\n"
-" # Label\n"
+" # Entry Label\n"
" set ef_label \"$ef.label\"\n"
" label $ef_label -textvariable entry_str -anchor w -font $bfont\n"
"\n"
@@ -2032,22 +2132,22 @@
" bind $ef_entry <KeyPress-Return> {set entry_set 1}\n"
" bind $ef_entry <KeyPress-Escape> {set entry_set 0}\n"
"\n"
-" # OK button\n"
+" # Entry OK button\n"
" set ef_ok \"$ef.ok\"\n"
" button $ef_ok -text OK -pady 1 -command {set entry_set 1} \\\n"
" -font $bfont\n"
"\n"
-" # Skip button\n"
+" # Entry Skip button\n"
" set ef_skip \"$ef.skip\"\n"
" button $ef_skip -text Skip -pady 0 -command {set entry_set 0} \\\n"
" -font $bfont\n"
"\n"
-" # Help button\n"
+" # Entry Help button\n"
" set ef_help \"$ef.help\"\n"
" button $ef_help -text Help -pady 0 -command \\\n"
" {menu_help $entry_dialog_item} -font $bfont\n"
"\n"
-" # Browse button\n"
+" # Entry Browse button\n"
" set ef_browse \"$ef.browse\"\n"
" button $ef_browse -text \"Browse...\" -pady 0 -font $bfont \\\n"
" -command {entry_insert [tk_getOpenFile]} \n"
@@ -2069,6 +2169,11 @@
"\n"
" update\n"
" wm minsize . [winfo width .] [winfo height .]\n"
+"\n"
+" #set w [winfo width .info]\n"
+" #puts \"w1: $w\"\n"
+" #set w [winfo reqwidth .info]\n"
+" #puts \"w2: $w\"\n"
"}\n"
"\n"
"proc menu_bindings {} {\n"
@@ -2335,13 +2440,13 @@
" lappend cmd \"2>\"\n"
" lappend cmd \"/dev/null\"\n"
"\n"
-"if {0} {\n"
-" set str [join $cmd]\n"
-" puts \"running: $str\"\n"
-" foreach word $cmd {\n"
-" puts \" word: $word\"\n"
+" if {0} {\n"
+" set str [join $cmd]\n"
+" puts \"running: $str\"\n"
+" foreach word $cmd {\n"
+" puts \" word: $word\"\n"
+" }\n"
" }\n"
-"}\n"
"\n"
" set output \"\"\n"
" menus_disable\n"
@@ -2420,7 +2525,7 @@
"global all_settings reply_xdisplay always_update\n"
"global max_text_height max_text_width\n"
"global menu_var unset_str menus_disabled\n"
-"global bfont\n"
+"global bfont old_labels\n"
"global connected_to_x11vnc\n"
"global delay_sleep extra_sleep extra_sleep_split\n"
"global cache_all_query_vars\n"
@@ -2442,6 +2547,12 @@
"set extra_sleep 1000\n"
"set extra_sleep_split 4\n"
"\n"
+"if {[regexp {^[34]} $tk_version] || $tk_version == \"8.0\"} {\n"
+" set old_labels 1\n"
+"} else {\n"
+" set old_labels 0\n"
+"}\n"
+"\n"
"if {\"$argv\" == \"-spit\"} {\n"
" set fh [open $argv0 r]\n"
" puts \"/*\"\n"