about summary refs log tree commit diff stats
path: root/doc/pydoc/ranger.gui.widgets.console_mode.html
blob: acae15bc558154d72205bfefe4a3276ac3c257ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module ranger.gui.widgets.console_mode</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="ranger.html"><font color="#ffffff">ranger</font></a>.<a href="ranger.gui.html"><font color="#ffffff">gui</font></a>.<a href="ranger.gui.widgets.html"><font color="#ffffff">widgets</font></a>.console_mode</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/hut/ranger/ranger/gui/widgets/console_mode.py">/home/hut/ranger/ranger/gui/widgets/console_mode.py</a></font></td></tr></table>
    <p><tt>#&nbsp;Copyright&nbsp;(c)&nbsp;2009,&nbsp;2010&nbsp;hut&nbsp;&lt;hut@lavabit.com&gt;<br>
#<br>
#&nbsp;Permission&nbsp;to&nbsp;use,&nbsp;copy,&nbsp;modify,&nbsp;and/or&nbsp;distribute&nbsp;this&nbsp;software&nbsp;for&nbsp;any<br>
#&nbsp;purpose&nbsp;with&nbsp;or&nbsp;without&nbsp;fee&nbsp;is&nbsp;hereby&nbsp;granted,&nbsp;provided&nbsp;that&nbsp;the&nbsp;above<br>
#&nbsp;copyright&nbsp;notice&nbsp;and&nbsp;this&nbsp;permission&nbsp;notice&nbsp;appear&nbsp;in&nbsp;all&nbsp;copies.<br>
#<br>
#&nbsp;THE&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;"AS&nbsp;IS"&nbsp;AND&nbsp;THE&nbsp;AUTHOR&nbsp;DISCLAIMS&nbsp;ALL&nbsp;WARRANTIES<br>
#&nbsp;WITH&nbsp;REGARD&nbsp;TO&nbsp;THIS&nbsp;SOFTWARE&nbsp;INCLUDING&nbsp;ALL&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF<br>
#&nbsp;MERCHANTABILITY&nbsp;AND&nbsp;FITNESS.&nbsp;IN&nbsp;NO&nbsp;EVENT&nbsp;SHALL&nbsp;THE&nbsp;AUTHOR&nbsp;BE&nbsp;LIABLE&nbsp;FOR<br>
#&nbsp;ANY&nbsp;SPECIAL,&nbsp;DIRECT,&nbsp;INDIRECT,&nbsp;OR&nbsp;CONSEQUENTIAL&nbsp;DAMAGES&nbsp;OR&nbsp;ANY&nbsp;DAMAGES<br>
#&nbsp;WHATSOEVER&nbsp;RESULTING&nbsp;FROM&nbsp;LOSS&nbsp;OF&nbsp;USE,&nbsp;DATA&nbsp;OR&nbsp;PROFITS,&nbsp;WHETHER&nbsp;IN&nbsp;AN<br>
#&nbsp;ACTION&nbsp;OF&nbsp;CONTRACT,&nbsp;NEGLIGENCE&nbsp;OR&nbsp;OTHER&nbsp;TORTIOUS&nbsp;ACTION,&nbsp;ARISING&nbsp;OUT&nbsp;OF<br>
#&nbsp;OR&nbsp;IN&nbsp;CONNECTION&nbsp;WITH&nbsp;THE&nbsp;USE&nbsp;OR&nbsp;PERFORMANCE&nbsp;OF&nbsp;THIS&nbsp;SOFTWARE.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-all_modes"><strong>all_modes</strong></a>(mode)</dt><dd><tt>Returns&nbsp;a&nbsp;generator&nbsp;containing&nbsp;all&nbsp;valid&nbsp;modes.</tt></dd></dl>
 <dl><dt><a name="-is_valid_mode"><strong>is_valid_mode</strong></a>(mode)</dt><dd><tt>Returns&nbsp;True&nbsp;or&nbsp;False&nbsp;depending&nbsp;on&nbsp;whether&nbsp;the&nbsp;mode&nbsp;is&nbsp;valid&nbsp;or&nbsp;not.</tt></dd></dl>
 <dl><dt><a name="-mode_to_class"><strong>mode_to_class</strong></a>(mode)</dt><dd><tt>Associates&nbsp;modes&nbsp;with&nbsp;the&nbsp;actual&nbsp;classes<br>
from&nbsp;ranger.gui.widgets.console.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>COMMAND</strong> = 1<br>
<strong>COMMAND_QUICK</strong> = 2<br>
<strong>DEFAULT</strong> = 0<br>
<strong>OPEN</strong> = 3<br>
<strong>OPEN_QUICK</strong> = 4<br>
<strong>SEARCH</strong> = 5</td></tr></table>
</body></html>
">* = - (2) PCRE_ERROR_BADOPTION* = - (3) PCRE_ERROR_BADMAGIC* = - (4) PCRE_ERROR_UNKNOWN_NODE* = - (5) PCRE_ERROR_NOMEMORY* = - (6) PCRE_ERROR_NOSUBSTRING* = - (7) PCRE_ERROR_MATCHLIMIT* = - (8) # Never used by PCRE itself PCRE_ERROR_CALLOUT* = - (9) PCRE_ERROR_BADUTF8* = - (10) PCRE_ERROR_BADUTF8_OFFSET* = - (11) PCRE_ERROR_PARTIAL* = - (12) PCRE_ERROR_BADPARTIAL* = - (13) PCRE_ERROR_INTERNAL* = - (14) PCRE_ERROR_BADCOUNT* = - (15) PCRE_ERROR_DFA_UITEM* = - (16) PCRE_ERROR_DFA_UCOND* = - (17) PCRE_ERROR_DFA_UMLIMIT* = - (18) PCRE_ERROR_DFA_WSSIZE* = - (19) PCRE_ERROR_DFA_RECURSE* = - (20) # Request types for pcre_fullinfo() PCRE_INFO_OPTIONS* = 0 PCRE_INFO_SIZE* = 1 PCRE_INFO_CAPTURECOUNT* = 2 PCRE_INFO_BACKREFMAX* = 3 PCRE_INFO_FIRSTBYTE* = 4 # For backwards compatibility PCRE_INFO_FIRSTCHAR* = 4 PCRE_INFO_FIRSTTABLE* = 5 PCRE_INFO_LASTLITERAL* = 6 PCRE_INFO_NAMEENTRYSIZE* = 7 PCRE_INFO_NAMECOUNT* = 8 PCRE_INFO_NAMETABLE* = 9 PCRE_INFO_STUDYSIZE* = 10 PCRE_INFO_DEFAULT_TABLES* = 11 # Request types for pcre_config() PCRE_CONFIG_UTF8* = 0 PCRE_CONFIG_NEWLINE* = 1 PCRE_CONFIG_LINK_SIZE* = 2 PCRE_CONFIG_POSIX_MALLOC_THRESHOLD* = 3 PCRE_CONFIG_MATCH_LIMIT* = 4 PCRE_CONFIG_STACKRECURSE* = 5 PCRE_CONFIG_UNICODE_PROPERTIES* = 6 # Bit flags for the pcre_extra structure PCRE_EXTRA_STUDY_DATA* = 0x00000001 PCRE_EXTRA_MATCH_LIMIT* = 0x00000002 PCRE_EXTRA_CALLOUT_DATA* = 0x00000004 PCRE_EXTRA_TABLES* = 0x00000008 # Exported PCRE functions proc pcre_compile*(para1: cstring, para2: cint, para3: ptr cstring, para4: ptr int, para5: Pbyte): PPcre{.importc: "pcre_compile", noconv.} proc pcre_compile2*(para1: cstring, para2: cint, para3: Pint, para4: PPchar, para5: ptr int, para6: Pbyte): PPcre{.importc: "pcre_compile2", noconv.} proc pcre_config*(para1: cint, para2: pointer): cint{.importc: "pcre_config", noconv.} proc pcre_copy_named_substring*(para1: PPcre, para2: cstring, para3: Pint, para4: cint, para5: cstring, para6: cstring, para7: cint): cint{. importc: "pcre_copy_named_substring", noconv.} proc pcre_copy_substring*(para1: cstring, para2: Pint, para3: cint, para4: cint, para5: cstring, para6: cint): cint{. importc: "pcre_copy_substring", noconv.} proc pcre_dfa_exec*(para1: PPcre, para2: Pextra, para3: cstring, para4: cint, para5: cint, para6: cint, para7: Pint, para8: cint, para9: Pint, para10: cint): cint{.importc: "pcre_dfa_exec", noconv.} proc pcre_exec*(para1: PPcre, para2: Pextra, para3: cstring, para4: cint, para5: cint, para6: cint, para7: Pint, para8: cint): cint{. importc: "pcre_exec", noconv.} proc pcre_free_substring*(para1: cstring){.importc: "pcre_free_substring", noconv.} proc pcre_free_substring_list*(para1: PPchar){. importc: "pcre_free_substring_list", noconv.} proc pcre_fullinfo*(para1: PPcre, para2: Pextra, para3: cint, para4: pointer): cint{. importc: "pcre_fullinfo", noconv.} proc pcre_get_named_substring*(para1: PPcre, para2: cstring, para3: Pint, para4: cint, para5: cstring, para6: PPchar): cint{. importc: "pcre_get_named_substring", noconv.} proc pcre_get_stringnumber*(para1: PPcre, para2: cstring): cint{. importc: "pcre_get_stringnumber", noconv.} proc pcre_get_substring*(para1: cstring, para2: Pint, para3: cint, para4: cint, para5: PPchar): cint{.importc: "pcre_get_substring", noconv.} proc pcre_get_substring_list*(para1: cstring, para2: Pint, para3: cint, para4: ptr PPchar): cint{. importc: "pcre_get_substring_list", noconv.} proc pcre_info*(para1: PPcre, para2: Pint, para3: Pint): cint{.importc: "pcre_info", noconv.} proc pcre_maketables*(): ptr byte{.importc: "pcre_maketables", noconv.} proc pcre_refcount*(para1: PPcre, para2: cint): cint{.importc: "pcre_refcount", noconv.} proc pcre_study*(para1: PPcre, para2: cint, para3: ptr CString): Pextra{. importc: "pcre_study", noconv.} proc pcre_version*(): CString{.importc: "pcre_version", noconv.} # Indirection for store get and free functions. These can be set to # alternative malloc/free functions if required. Special ones are used in the # non-recursive case for "frames". There is also an optional callout function # that is triggered by the (?) regex item. # # we use Nimrod's memory manager (but not GC!) for these functions: type TMalloc = proc (para1: int): pointer{.noconv.} TFree = proc (para1: pointer){.noconv.} var pcre_malloc{.importc: "pcre_malloc".}: TMalloc pcre_free{.importc: "pcre_free".}: TFree pcre_stack_malloc{.importc: "pcre_stack_malloc".}: TMalloc pcre_stack_free{.importc: "pcre_stack_free".}: TFree pcre_callout{.importc: "pcre_callout".}: proc (para1: Pcallout_block): cint{. noconv.} pcre_malloc = cast[TMalloc](system.alloc) pcre_free = cast[TFree](system.dealloc) pcre_stack_malloc = cast[TMalloc](system.alloc) pcre_stack_free = cast[TFree](system.dealloc) pcre_callout = nil