mirror of
https://github.com/akelge/zsh
synced 2025-07-04 21:49:05 +00:00
Added GetLatestScript update plugin and updated all plugins
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
# FILE: autoload/conque_term/conque_win32_util.py {{{
|
||||
# FILE: autoload/conque_term/conque_win32_util.py
|
||||
# AUTHOR: Nico Raffo <nicoraffo@gmail.com>
|
||||
# WEBSITE: http://conque.googlecode.com
|
||||
# MODIFIED: 2010-11-15
|
||||
# VERSION: 2.0, for Vim 7.0
|
||||
# MODIFIED: 2011-08-12
|
||||
# VERSION: 2.2, for Vim 7.0
|
||||
# LICENSE:
|
||||
# Conque - Vim terminal/console emulator
|
||||
# Copyright (C) 2009-2010 Nico Raffo
|
||||
# Copyright (C) 2009-__YEAR__ Nico Raffo
|
||||
#
|
||||
# MIT License
|
||||
#
|
||||
@ -25,15 +25,15 @@
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE. }}}
|
||||
# THE SOFTWARE.
|
||||
|
||||
"""Python structures used for ctypes interaction"""
|
||||
""" Python constants and structures used for ctypes interaction. """
|
||||
|
||||
from ctypes import *
|
||||
|
||||
# Constants
|
||||
|
||||
# create process flag constants {{{
|
||||
# create process flag constants
|
||||
|
||||
CREATE_BREAKAWAY_FROM_JOB = 0x01000000
|
||||
CREATE_DEFAULT_ERROR_MODE = 0x04000000
|
||||
@ -46,15 +46,14 @@ CREATE_SEPARATE_WOW_VDM = 0x00000800
|
||||
CREATE_SHARED_WOW_VDM = 0x00001000
|
||||
CREATE_SUSPENDED = 0x00000004
|
||||
CREATE_UNICODE_ENVIRONMENT = 0x00000400
|
||||
|
||||
|
||||
DEBUG_ONLY_THIS_PROCESS = 0x00000002
|
||||
DEBUG_PROCESS = 0x00000001
|
||||
DETACHED_PROCESS = 0x00000008
|
||||
EXTENDED_STARTUPINFO_PRESENT = 0x00080000
|
||||
INHERIT_PARENT_AFFINITY = 0x00010000
|
||||
|
||||
# }}}
|
||||
|
||||
# process priority constants {{{
|
||||
# process priority constants
|
||||
|
||||
ABOVE_NORMAL_PRIORITY_CLASS = 0x00008000
|
||||
BELOW_NORMAL_PRIORITY_CLASS = 0x00004000
|
||||
@ -63,9 +62,8 @@ IDLE_PRIORITY_CLASS = 0x00000040
|
||||
NORMAL_PRIORITY_CLASS = 0x00000020
|
||||
REALTIME_PRIORITY_CLASS = 0x00000100
|
||||
|
||||
# }}}
|
||||
|
||||
# startup info constants {{{
|
||||
# startup info constants
|
||||
|
||||
STARTF_FORCEONFEEDBACK = 0x00000040
|
||||
STARTF_FORCEOFFFEEDBACK = 0x00000080
|
||||
@ -81,9 +79,8 @@ STARTF_USESHOWWINDOW = 0x00000001
|
||||
STARTF_USESIZE = 0x00000002
|
||||
STARTF_USESTDHANDLES = 0x00000100
|
||||
|
||||
# }}}
|
||||
|
||||
# show window constants {{{
|
||||
# show window constants
|
||||
|
||||
SW_FORCEMINIMIZE = 11
|
||||
SW_HIDE = 0
|
||||
@ -99,9 +96,8 @@ SW_SHOWNA = 8
|
||||
SW_SHOWNOACTIVATE = 4
|
||||
SW_SHOWNORMAL = 1
|
||||
|
||||
# }}}
|
||||
|
||||
# input event types {{{
|
||||
# input event types
|
||||
|
||||
FOCUS_EVENT = 0x0010
|
||||
KEY_EVENT = 0x0001
|
||||
@ -109,9 +105,8 @@ MENU_EVENT = 0x0008
|
||||
MOUSE_EVENT = 0x0002
|
||||
WINDOW_BUFFER_SIZE_EVENT = 0x0004
|
||||
|
||||
# }}}
|
||||
|
||||
# key event modifiers {{{
|
||||
# key event modifiers
|
||||
|
||||
CAPSLOCK_ON = 0x0080
|
||||
ENHANCED_KEY = 0x0100
|
||||
@ -123,9 +118,8 @@ RIGHT_CTRL_PRESSED = 0x0004
|
||||
SCROLLLOCK_ON = 0x0040
|
||||
SHIFT_PRESSED = 0x0010
|
||||
|
||||
# }}}
|
||||
|
||||
# process access {{{
|
||||
# process access
|
||||
|
||||
PROCESS_CREATE_PROCESS = 0x0080
|
||||
PROCESS_CREATE_THREAD = 0x0002
|
||||
@ -140,17 +134,15 @@ PROCESS_VM_OPERATION = 0x0008
|
||||
PROCESS_VM_READ = 0x0010
|
||||
PROCESS_VM_WRITE = 0x0020
|
||||
|
||||
# }}}
|
||||
|
||||
# input / output handles {{{
|
||||
# input / output handles
|
||||
|
||||
STD_INPUT_HANDLE = c_ulong(-10)
|
||||
STD_OUTPUT_HANDLE = c_ulong(-11)
|
||||
STD_ERROR_HANDLE = c_ulong(-12)
|
||||
|
||||
# }}}
|
||||
|
||||
CONQUE_WINDOWS_VK = { # {{{
|
||||
CONQUE_WINDOWS_VK = {
|
||||
'VK_LBUTTON': 0x0001,
|
||||
'VK_RBUTTON': 0x0002,
|
||||
'VK_CANCEL': 0x0003,
|
||||
@ -280,19 +272,16 @@ CONQUE_WINDOWS_VK_ENHANCED = {
|
||||
str(int(CONQUE_WINDOWS_VK['VK_END'])): 1
|
||||
}
|
||||
|
||||
# }}}
|
||||
|
||||
# structures used for CreateProcess
|
||||
|
||||
# Odd types {{{
|
||||
# Odd types
|
||||
|
||||
LPBYTE = POINTER(c_ubyte)
|
||||
LPTSTR = POINTER(c_char)
|
||||
|
||||
# }}}
|
||||
|
||||
|
||||
class STARTUPINFO(Structure): # {{{
|
||||
class STARTUPINFO(Structure):
|
||||
_fields_ = [("cb", c_ulong),
|
||||
("lpReserved", LPTSTR),
|
||||
("lpDesktop", LPTSTR),
|
||||
@ -315,9 +304,8 @@ class STARTUPINFO(Structure): # {{{
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class PROCESS_INFORMATION(Structure): # {{{
|
||||
class PROCESS_INFORMATION(Structure):
|
||||
_fields_ = [("hProcess", c_void_p),
|
||||
("hThread", c_void_p),
|
||||
("dwProcessId", c_ulong),
|
||||
@ -326,9 +314,8 @@ class PROCESS_INFORMATION(Structure): # {{{
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class MEMORY_BASIC_INFORMATION(Structure): # {{{
|
||||
class MEMORY_BASIC_INFORMATION(Structure):
|
||||
_fields_ = [("BaseAddress", c_void_p),
|
||||
("AllocationBase", c_void_p),
|
||||
("AllocationProtect", c_ulong),
|
||||
@ -340,9 +327,8 @@ class MEMORY_BASIC_INFORMATION(Structure): # {{{
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class SECURITY_ATTRIBUTES(Structure): # {{{
|
||||
class SECURITY_ATTRIBUTES(Structure):
|
||||
_fields_ = [("Length", c_ulong),
|
||||
("SecDescriptor", c_void_p),
|
||||
("InheritHandle", c_bool)]
|
||||
@ -350,18 +336,16 @@ class SECURITY_ATTRIBUTES(Structure): # {{{
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class COORD(Structure): # {{{
|
||||
class COORD(Structure):
|
||||
_fields_ = [("X", c_short),
|
||||
("Y", c_short)]
|
||||
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class SMALL_RECT(Structure): # {{{
|
||||
class SMALL_RECT(Structure):
|
||||
_fields_ = [("Left", c_short),
|
||||
("Top", c_short),
|
||||
("Right", c_short),
|
||||
@ -370,9 +354,8 @@ class SMALL_RECT(Structure): # {{{
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class CONSOLE_SCREEN_BUFFER_INFO(Structure): # {{{
|
||||
class CONSOLE_SCREEN_BUFFER_INFO(Structure):
|
||||
_fields_ = [("dwSize", COORD),
|
||||
("dwCursorPosition", COORD),
|
||||
("wAttributes", c_short),
|
||||
@ -382,27 +365,24 @@ class CONSOLE_SCREEN_BUFFER_INFO(Structure): # {{{
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class CHAR_UNION(Union): # {{{
|
||||
class CHAR_UNION(Union):
|
||||
_fields_ = [("UnicodeChar", c_wchar),
|
||||
("AsciiChar", c_char)]
|
||||
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class CHAR_INFO(Structure): # {{{
|
||||
class CHAR_INFO(Structure):
|
||||
_fields_ = [("Char", CHAR_UNION),
|
||||
("Attributes", c_short)]
|
||||
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class KEY_EVENT_RECORD(Structure): # {{{
|
||||
class KEY_EVENT_RECORD(Structure):
|
||||
_fields_ = [("bKeyDown", c_byte),
|
||||
("pad2", c_byte),
|
||||
('pad1', c_short),
|
||||
@ -415,9 +395,8 @@ class KEY_EVENT_RECORD(Structure): # {{{
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class MOUSE_EVENT_RECORD(Structure): # {{{
|
||||
class MOUSE_EVENT_RECORD(Structure):
|
||||
_fields_ = [("dwMousePosition", COORD),
|
||||
("dwButtonState", c_int),
|
||||
("dwControlKeyState", c_int),
|
||||
@ -426,32 +405,29 @@ class MOUSE_EVENT_RECORD(Structure): # {{{
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class WINDOW_BUFFER_SIZE_RECORD(Structure): # {{{
|
||||
class WINDOW_BUFFER_SIZE_RECORD(Structure):
|
||||
_fields_ = [("dwSize", COORD)]
|
||||
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class MENU_EVENT_RECORD(Structure): # {{{
|
||||
class MENU_EVENT_RECORD(Structure):
|
||||
_fields_ = [("dwCommandId", c_uint)]
|
||||
|
||||
def to_str(self):
|
||||
return ''
|
||||
|
||||
# }}}
|
||||
|
||||
class FOCUS_EVENT_RECORD(Structure): # {{{
|
||||
class FOCUS_EVENT_RECORD(Structure):
|
||||
_fields_ = [("bSetFocus", c_byte)]
|
||||
|
||||
def to_str(self):
|
||||
return ''
|
||||
# }}}
|
||||
|
||||
class INPUT_UNION(Union): # {{{
|
||||
|
||||
class INPUT_UNION(Union):
|
||||
_fields_ = [("KeyEvent", KEY_EVENT_RECORD),
|
||||
("MouseEvent", MOUSE_EVENT_RECORD),
|
||||
("WindowBufferSizeEvent", WINDOW_BUFFER_SIZE_RECORD),
|
||||
@ -460,14 +436,13 @@ class INPUT_UNION(Union): # {{{
|
||||
|
||||
def to_str(self):
|
||||
return ''
|
||||
# }}}
|
||||
|
||||
class INPUT_RECORD(Structure): # {{{
|
||||
|
||||
class INPUT_RECORD(Structure):
|
||||
_fields_ = [("EventType", c_short),
|
||||
("Event", INPUT_UNION)]
|
||||
|
||||
def to_str(self):
|
||||
return ''
|
||||
# }}}
|
||||
|
||||
# vim:foldmethod=marker
|
||||
|
||||
|
Reference in New Issue
Block a user