diff options
author | runge <runge> | 2005-01-16 04:49:44 +0000 |
---|---|---|
committer | runge <runge> | 2005-01-16 04:49:44 +0000 |
commit | b58e460fac13a47e9a4de6df0df45cccf9f701f2 (patch) | |
tree | ff83ad16e6e066f124590566bedd716a6215c6c3 /x11vnc/tkx11vnc.h | |
parent | 336d7dad1df6aa02c7b2e67e4ea2ebcc3be9d458 (diff) | |
download | libtdevnc-b58e460fac13a47e9a4de6df0df45cccf9f701f2.tar.gz libtdevnc-b58e460fac13a47e9a4de6df0df45cccf9f701f2.zip |
add cursor alphablending to rfb.h cursor.c, x11vnc -alphablend -snapfb etc..
Diffstat (limited to 'x11vnc/tkx11vnc.h')
-rw-r--r-- | x11vnc/tkx11vnc.h | 227 |
1 files changed, 83 insertions, 144 deletions
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h index cf4beb7..2870d2e 100644 --- a/x11vnc/tkx11vnc.h +++ b/x11vnc/tkx11vnc.h @@ -145,6 +145,7 @@ "Pointer\n" " =-C:none,arrow,X,some,most cursor:\n" " noxfixes\n" +" alphablend\n" " --\n" " cursorpos\n" " nocursorshape\n" @@ -166,6 +167,7 @@ " bg\n" " =-C:ignore,exit sigpipe:\n" " =0 inetd\n" +" rfbwait:\n" " --\n" " =RA remote-cmd:\n" " =GA all-settings\n" @@ -210,17 +212,19 @@ " unsafe\n" "\n" "Tuning\n" -" =-C:1,2,3,4 pointer_mode:\n" +" =-C:0,1,2,3,4 pointer_mode:\n" " input_skip:\n" " nodragging\n" -" alphacut:\n" -" alphafrac:\n" -" alpharemove\n" " --\n" " =D noshm\n" " flipbyteorder\n" " onetile\n" " --\n" +" alphacut:\n" +" alphafrac:\n" +" alpharemove\n" +" --\n" +" speeds:\n" " wait:\n" " defer:\n" " nap\n" @@ -230,9 +234,9 @@ " gaps:\n" " grow:\n" " fuzz:\n" +" snapfb\n" " --\n" " threads\n" -" rfbwait:\n" " --\n" " progressive:\n" "\"\n" @@ -335,8 +339,7 @@ "remote control commands. See \\\"Help -> all\\\" for much info about x11vnc.\n" "\n" "Most menu items have a (?) button one can click on to get more information\n" -"about the option or command. In most cases it will be text extracted\n" -"from that in \\\"Help -> all\\\".\n" +"about the option or command.\n" "\n" "There are two states tkx11vnc can be in:\n" "\n" @@ -469,7 +472,7 @@ "\n" "proc textwin {name title text} {\n" " global max_text_height max_text_width\n" -" global bfont\n" +" global bfont ffont\n" "\n" " set width [textwidth $text]\n" " incr width\n" @@ -487,9 +490,11 @@ " frame $w.f -bd 0;\n" " pack $w.f -fill both -expand 1\n" " text $w.f.t -width $width -height $height -setgrid 1 -bd 2 \\\n" -" -yscrollcommand \"$w.f.y set\" -relief ridge -font fixed;\n" +" -yscrollcommand \"$w.f.y set\" -relief ridge \\\n" +" -font $ffont;\n" " scrollbar $w.f.y -orient v -relief sunken -command \"$w.f.t yview\";\n" -" button $w.f.b -text \"Dismiss\" -command \"destroy $w\" -font $bfont\n" +" button $w.f.b -text \"Dismiss\" -command \"destroy $w\" -font $bfont \\\n" +" -pady 2\n" "\n" " $w.f.t insert 1.0 $text;\n" "\n" @@ -915,121 +920,6 @@ "\n" "# Utilities for remote control and updating vars.\n" "\n" -"proc push_new_value0 {item name new {query 1}} {\n" -" # old way w/o -sync\n" -" global menu_var always_update remote_output query_output\n" -" global delay_sleep extra_sleep extra_sleep_split\n" -"\n" -" set debug [in_debug_mode]\n" -" set do_query_all 0\n" -" set getout 0\n" -"\n" -" if {$item == \"remote-cmd\"} {\n" -" # kludge for arbitrary remote command:\n" -" if {[regexp {^Q:} $new]} {\n" -" # extra kludge for Q:var to mean -Q var\n" -" regsub {^Q:} $new \"\" new\n" -" set qonly 1\n" -" } else {\n" -" set qonly 0\n" -" }\n" -" # need to extract item from new:\n" -" set qtmp $new\n" -" regsub {:.*$} $qtmp \"\" qtmp\n" -" if {! $qonly} {\n" -" set rargs [list \"-R\" \"$new\"]\n" -" set qargs [list \"-Q\" \"$qtmp\"]\n" -" set getout 1\n" -" } else {\n" -" set rargs [list \"-Q\" \"$qtmp\"]\n" -" set qargs [list \"-Q\" \"$qtmp\"]\n" -" }\n" -"\n" -" } elseif {[value_is_string $item]} {\n" -" set rargs [list \"-R\" \"$name:$new\"]\n" -" set qargs [list \"-Q\" \"$name\"]\n" -" } else {\n" -" set rargs [list \"-R\" \"$name\"]\n" -" set qargs [list \"-Q\" \"$name\"]\n" -" }\n" -"\n" -" if {!$debug} {\n" -" append_text \"x11vnc $rargs ...\"\n" -" }\n" -" set remote_output [run_remote_cmd $rargs]\n" -"\n" -" if {[lindex $rargs 0] == \"-Q\"} {\n" -" append_text \"\\t$remote_output\"\n" -" set getout 1\n" -" } elseif {! $query && ! $always_update} {\n" -" set getout 1\n" -" } elseif {$item == \"noremote\"} {\n" -" set getout 1\n" -" } elseif {[is_action $item] && ![opt_match Q $item] && $rargs != \"\"} {\n" -" set getout 1\n" -" } elseif {[regexp {^(sid|id)$} $item] && ![regexp {^0x} $new]} {\n" -" set getout 1\n" -" }\n" -"\n" -" if {$getout} {\n" -" append_text \"\\n\"\n" -" return\n" -" }\n" -"\n" -" stop_watch on\n" -" after $delay_sleep\n" -" if {[opt_match D $item]} {\n" -" set s [expr $extra_sleep/$extra_sleep_split] \n" -" append_text \" \"\n" -" for {set i 0} {$i<$extra_sleep_split} {incr i} {\n" -" after $s\n" -" append_text \".\"\n" -" update\n" -" }\n" -" }\n" -" stop_watch off\n" -"\n" -" if {!$debug} {\n" -" append_text \", -Q ...\"\n" -" }\n" -"\n" -" if {$item == \"disconnect\"} {\n" -" set new \"N/A\"\n" -" set do_query_all 1\n" -" }\n" -"\n" -" if {$always_update || $do_query_all} {\n" -" set query [query_all 1]\n" -" } else {\n" -" set query [run_remote_cmd $qargs]\n" -" }\n" -" set query_output $query\n" -"\n" -" if {![see_if_ok $query $item \"$name:$new\"]} {\n" -" # failed\n" -" if {[regexp {^a..=} $query]} {\n" -" # but some result came back\n" -" if {! $always_update} {\n" -" # synchronize everything\n" -" set query_output [query_all 1]\n" -" }\n" -" } else {\n" -" # server may be dead\n" -" if {$item != \"ping\" && $item != \"attach\"} {\n" -" try_connect\n" -" }\n" -" }\n" -" } else {\n" -" # succeeded\n" -" if {! $always_update} {\n" -" # synchronize this variable\n" -" update_menu_vars $query\n" -" } else {\n" -" # already done in query_all\n" -" }\n" -" }\n" -"}\n" -"\n" "proc push_new_value {item name new {query 1}} {\n" " global menu_var always_update remote_output query_output\n" " global delay_sleep extra_sleep extra_sleep_split\n" @@ -1270,6 +1160,25 @@ " } else {\n" " set msg $found\n" " }\n" +" if {!$ok && $found != \"\"} {\n" +" # check for floating point match:\n" +" set v1 \"\"\n" +" set v2 \"\"\n" +" regexp {:([0-9.][0-9.]*)$} $found m0 v1\n" +" regexp {:([0-9.][0-9.]*)$} $expected m0 v2\n" +" if {$v1 != \"\" && $v2 != \"\"} {\n" +" set diff \"\"\n" +" catch {set diff [expr \"$v1 - $v2\"]}\n" +" if {$diff != \"\"} {\n" +" if {$diff < 0} {\n" +" set diff [expr \"0.0 - $diff\"]\n" +" }\n" +" if {$diff < 0.00001} {\n" +" set ok 1\n" +" }\n" +" }\n" +" }\n" +" }\n" " if {$ok} {\n" " append_text \"\\tSet OK ($msg)\\n\"\n" " return 1\n" @@ -1278,6 +1187,12 @@ " # e.g. blackout:+30x30+20+20\n" " append_text \"\\t($msg)\\n\"\n" " return 1\n" +" } elseif {[regexp {:[0-9]\\.[0-9]} $expected]} {\n" +" append_text \"\\t($msg)\\n\"\n" +" return 1\n" +" } elseif {$item == \"connect\" || $item == \"disconnect\"} {\n" +" append_text \"\\t($msg)\\n\"\n" +" return 1\n" " } else {\n" " append_text \"\\t*FAILED* $msg\\n\"\n" " return 0\n" @@ -1304,13 +1219,14 @@ " if {$val == \"N/A\"} {\n" " continue\n" " }\n" -" if {0 && $debug} {\n" -" puts \"setting menuvar: $item: $old -> $val\"\n" -" }\n" " set menu_var($item) $val\n" " }\n" " if {$item == \"clients\"} {\n" " update_clients_menu $val\n" +" } elseif {$item == \"display\"} {\n" +" set_x11_display $val\n" +" } elseif {$item == \"vncdisplay\"} {\n" +" set_vnc_display $val\n" " }\n" " }\n" " }\n" @@ -1335,6 +1251,7 @@ " }\n" " }\n" " }\n" +" append_text \"Cleared all settings.\\n\"\n" "}\n" "\n" "proc all_query_vars {} {\n" @@ -1819,10 +1736,10 @@ "}\n" "\n" "proc update_clients_menu {list} {\n" -" global item_cascade\n" +" global item_cascade ffont\n" " set subm $item_cascade(current);\n" " catch {destroy $subm}\n" -" menu $subm -tearoff 0\n" +" menu $subm -tearoff 0 -font $ffont\n" " $subm add command\n" " $subm add command -label \"refresh-list\" -command \"update_clients_and_repost\"\n" " $subm add separator\n" @@ -1872,14 +1789,14 @@ " 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 bfont ffont\n" " global helptext helpremote helplabel\n" "\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" +" -anchor w -width $label_width -font $ffont\n" " pack $info_label -side top -fill x -expand 0\n" "\n" " # Extract the Rows:\n" @@ -1995,11 +1912,13 @@ " } elseif {$item == \"Quit\"} {\n" " # Quit item must shut us down:\n" " $m add command -label \"$item\" -underline 0 \\\n" +" -font $ffont \\\n" " -command {destroy .; exit 0}\n" "\n" " } elseif {$case == \"Help\"} {\n" " # Help is simple help:\n" " $m add command -label \"$item\" \\\n" +" -font $ffont \\\n" " -command \"menu_help $item\"\n" "\n" " } elseif {$item == \"current\"} {\n" @@ -2008,11 +1927,13 @@ " set item_cascade($item) $subm\n" " update_clients_menu \"\"\n" " $m add cascade -label \"$item\" \\\n" +" -font $ffont \\\n" " -menu $subm\n" "\n" " } elseif {[is_action $item]} {\n" " # Action\n" " $m add command -label \"$item\" \\\n" +" -font $ffont \\\n" " -command \"do_var $item\"\n" " set menu_var($item) \"\"; # for convenience\n" "\n" @@ -2021,19 +1942,22 @@ " if {[regexp -- {-C:(.*)} $item_opts($item) m0 m1]} {\n" " # Radiobutton select\n" " set subm $m.cascade$menu_count($case)\n" -" menu $subm -tearoff 0\n" +" menu $subm -tearoff 0 -font $ffont\n" " foreach val [split $m1 \",\"] {\n" " $subm add radiobutton -label \"$val\" \\\n" " -command \"do_var $item\" \\\n" " -value \"$val\" \\\n" +" -font $ffont \\\n" " -variable menu_var($item)\n" " }\n" " $m add cascade -label \"$item\" \\\n" +" -font $ffont \\\n" " -menu $subm\n" " set item_cascade($item) $subm\n" " } else {\n" " # Arbitrary_string\n" " $m add command -label \"$item\" \\\n" +" -font $ffont \\\n" " -command \"do_var $item\"\n" " }\n" " set mvar 1\n" @@ -2042,6 +1966,7 @@ " # Boolean\n" " $m add checkbutton -label \"$item\" \\\n" " -command \"do_var $item\" \\\n" +" -font $ffont \\\n" " -variable menu_var($item)\n" " set menu_var($item) 0\n" " }\n" @@ -2075,6 +2000,7 @@ " set str \"(?)\"\n" " }\n" " $m add command -label $str \\\n" +" -font $ffont \\\n" " -command \"menu_help $label\";\n" "\n" " if {$str == \"\"} {\n" @@ -2100,17 +2026,19 @@ " no_x11_display\n" "\n" " set lw [expr {$label_width / 2}]\n" -" label $df_x11 -textvariable x11_display -width $lw -anchor w\n" +" label $df_x11 -textvariable x11_display -width $lw -anchor w \\\n" +" -font $ffont\n" "\n" " set df_vnc \"$df.vdisplay\"\n" " no_vnc_display\n" -" label $df_vnc -textvariable vnc_display -width $lw -anchor w\n" +" label $df_vnc -textvariable vnc_display -width $lw -anchor w \\\n" +" -font $ffont\n" "\n" " pack $df_x11 $df_vnc -side left \n" " pack $df -side top -fill x\n" "\n" " # text area\n" -" text .text -height 11 -relief ridge\n" +" text .text -height 11 -relief ridge -font $ffont\n" " set text_area .text\n" " pack .text -side top -fill both -expand 1\n" "\n" @@ -2128,28 +2056,35 @@ "\n" " set entry_str \"Set... : \"\n" " set ef_entry \"$ef.entry\"\n" -" entry $ef_entry -relief sunken\n" +" entry $ef_entry -relief sunken -font $ffont\n" " bind $ef_entry <KeyPress-Return> {set entry_set 1}\n" " bind $ef_entry <KeyPress-Escape> {set entry_set 0}\n" "\n" " # Entry OK button\n" +" set bpx \"1m\"\n" +" set bpy \"1\"\n" +" set hlt \"0\"\n" " set ef_ok \"$ef.ok\"\n" -" button $ef_ok -text OK -pady 1 -command {set entry_set 1} \\\n" +" button $ef_ok -text OK -pady $bpy -padx $bpx -command {set entry_set 1} \\\n" +" -highlightthickness $hlt \\\n" " -font $bfont\n" "\n" " # Entry Skip button\n" " set ef_skip \"$ef.skip\"\n" -" button $ef_skip -text Skip -pady 0 -command {set entry_set 0} \\\n" +" button $ef_skip -text Skip -pady $bpy -padx $bpx -command {set entry_set 0} \\\n" +" -highlightthickness $hlt \\\n" " -font $bfont\n" "\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" +" button $ef_help -text Help -pady $bpy -padx $bpx -command \\\n" +" {menu_help $entry_dialog_item} -font $bfont \\\n" +" -highlightthickness $hlt\n" "\n" " # Entry Browse button\n" " set ef_browse \"$ef.browse\"\n" -" button $ef_browse -text \"Browse...\" -pady 0 -font $bfont \\\n" +" button $ef_browse -text \"Browse...\" -pady $bpy -padx $bpx -font $bfont \\\n" +" -highlightthickness $hlt \\\n" " -command {entry_insert [tk_getOpenFile]} \n" "\n" " pack $ef_label -side left\n" @@ -2322,6 +2257,9 @@ " if {$item == \"id\"} {\n" " set saw_id 1\n" " }\n" +" if {$item == \"httpport\" && $menu_var($item) == \"0\"} {\n" +" continue\n" +" }\n" " if {$item == \"progressive\" && $menu_var($item) == \"0\"} {\n" " continue\n" " }\n" @@ -2525,7 +2463,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 old_labels\n" +"global bfont ffont old_labels\n" "global connected_to_x11vnc\n" "global delay_sleep extra_sleep extra_sleep_split\n" "global cache_all_query_vars\n" @@ -2535,7 +2473,8 @@ "set menus_disabled 0\n" "set max_text_height 40\n" "set max_text_width 90\n" -"set bfont -adobe-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*;\n" +"set bfont \"-adobe-helvetica-bold-r-*-*-*-120-*-*-*-*-*-*\"\n" +"set ffont \"fixed\"\n" "set help_indent 24;\n" "set reply_xdisplay \"\"\n" "set all_settings \"None so far.\"\n" |