Merge branch 'master' of http://dharmatech.onigirihouse.com/factor
commit
bce173d749
|
@ -389,7 +389,7 @@ SYMBOL: interactive-vocabs
|
|||
: with-interactive-vocabs ( quot -- )
|
||||
[
|
||||
"scratchpad" in set
|
||||
interactive-vocabs get set-use
|
||||
interactive-vocabs get set-use
|
||||
call
|
||||
] with-scope ; inline
|
||||
|
||||
|
|
|
@ -18,10 +18,6 @@ HELP: ch>ascii-escape
|
|||
{ $values { "ch" "a character" } { "str" string } }
|
||||
{ $description "Converts a character to an escape code." } ;
|
||||
|
||||
HELP: ch>unicode-escape
|
||||
{ $values { "ch" "a character" } { "str" string } }
|
||||
{ $description "Converts a character to a Unicode escape code (" { $snippet "\\u123456"} ")." } ;
|
||||
|
||||
HELP: unparse-ch
|
||||
{ $values { "ch" "a character" } }
|
||||
{ $description "Adds the character to the sequence being constructed (see " { $link "namespaces-make" } "). If the character can appear in a string literal, it is added directly, otherwise an escape code is added." } ;
|
||||
|
|
|
@ -62,9 +62,9 @@ DEFER: automata-window
|
|||
{
|
||||
[ "1 - Center" [ start-center ] view-button ]
|
||||
[ "2 - Random" [ start-random ] view-button ]
|
||||
[ "3 - Continue" [ run-rule ] view-button ]
|
||||
[ "3 - Continue" [ run-rule ] view-button ]
|
||||
[ "5 - Random Rule" [ random-rule ] view-button ]
|
||||
[ "n - New" [ automata-window ] view-button ]
|
||||
[ "n - New" [ automata-window ] view-button ]
|
||||
} make*
|
||||
[ [ gadget, ] curry ] map concat ! Hack
|
||||
make-shelf over @top grid-add
|
||||
|
@ -75,7 +75,7 @@ over @center grid-add
|
|||
{
|
||||
{ T{ key-down f f "1" } [ [ start-center ] view-action ] }
|
||||
{ T{ key-down f f "2" } [ [ start-random ] view-action ] }
|
||||
{ T{ key-down f f "3" } [ [ run-rule ] view-action ] }
|
||||
{ T{ key-down f f "3" } [ [ run-rule ] view-action ] }
|
||||
{ T{ key-down f f "5" } [ [ random-rule ] view-action ] }
|
||||
{ T{ key-down f f "n" } [ [ automata-window ] view-action ] }
|
||||
} [ make* ] map >hashtable <handler> tuck set-gadget-delegate
|
||||
|
|
|
@ -38,16 +38,16 @@ DEFER: bake
|
|||
|
||||
: bake-item ( item -- )
|
||||
{ { [ dup \ , = ] [ drop , ] }
|
||||
{ [ dup \ % = ] [ drop % ] }
|
||||
{ [ dup \ ,u = ] [ drop ,u ] }
|
||||
{ [ dup \ % = ] [ drop % ] }
|
||||
{ [ dup \ ,u = ] [ drop ,u ] }
|
||||
{ [ dup insert-quot? ] [ insert-quot-expr call , ] }
|
||||
{ [ dup splice-quot? ] [ splice-quot-expr call % ] }
|
||||
{ [ dup integer? ] [ , ] }
|
||||
{ [ dup string? ] [ , ] }
|
||||
{ [ dup string? ] [ , ] }
|
||||
{ [ dup tuple? ] [ tuple>array bake >tuple , ] }
|
||||
{ [ dup assoc? ] [ [ >alist bake ] keep assoc-like , ] }
|
||||
{ [ dup sequence? ] [ bake , ] }
|
||||
{ [ t ] [ , ] } }
|
||||
{ [ t ] [ , ] } }
|
||||
cond ;
|
||||
|
||||
: bake-items ( seq -- ) [ bake-item ] each ;
|
||||
|
|
|
@ -9,10 +9,10 @@ IN: builder
|
|||
|
||||
: datestamp ( -- string )
|
||||
now `{ ,[ dup timestamp-year ]
|
||||
,[ dup timestamp-month ]
|
||||
,[ dup timestamp-day ]
|
||||
,[ dup timestamp-hour ]
|
||||
,[ timestamp-minute ] }
|
||||
,[ dup timestamp-month ]
|
||||
,[ dup timestamp-day ]
|
||||
,[ dup timestamp-hour ]
|
||||
,[ timestamp-minute ] }
|
||||
[ number>string 2 CHAR: 0 pad-left ] map "-" join ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
|
||||
USING: cairo math math.constants byte-arrays kernel ui ui.render
|
||||
ui.gadgets opengl.gl ;
|
||||
ui.gadgets opengl.gl ;
|
||||
|
||||
IN: cairo-demo
|
||||
|
||||
|
@ -66,7 +66,7 @@ M: cairo-gadget ungraft* ( gadget -- )
|
|||
|
||||
: run ( -- )
|
||||
[
|
||||
<cairo-gadget> "Hello World from Factor!" open-window
|
||||
<cairo-gadget> "Hello World from Factor!" open-window
|
||||
] with-ui ;
|
||||
|
||||
MAIN: run
|
||||
|
|
|
@ -13,9 +13,9 @@ USING: alien alien.syntax combinators system ;
|
|||
IN: cairo
|
||||
|
||||
<< "cairo" {
|
||||
{ [ win32? ] [ "cairo.dll" ] }
|
||||
{ [ macosx? ] [ "libcairo.dylib" ] }
|
||||
{ [ unix? ] [ "libcairo.so.2" ] }
|
||||
{ [ win32? ] [ "cairo.dll" ] }
|
||||
{ [ macosx? ] [ "libcairo.dylib" ] }
|
||||
{ [ unix? ] [ "libcairo.so.2" ] }
|
||||
} cond "cdecl" add-library >>
|
||||
|
||||
! cairo_status_t
|
||||
|
@ -152,12 +152,12 @@ C-STRUCT: cairo_t
|
|||
{ "uint" "status ! cairo_status_t" } ;
|
||||
|
||||
C-STRUCT: cairo_matrix_t
|
||||
{ "double" "xx" }
|
||||
{ "double" "yx" }
|
||||
{ "double" "xy" }
|
||||
{ "double" "yy" }
|
||||
{ "double" "x0" }
|
||||
{ "double" "y0" } ;
|
||||
{ "double" "xx" }
|
||||
{ "double" "yx" }
|
||||
{ "double" "xy" }
|
||||
{ "double" "yy" }
|
||||
{ "double" "x0" }
|
||||
{ "double" "y0" } ;
|
||||
|
||||
! cairo_format_t
|
||||
C-ENUM:
|
||||
|
@ -204,16 +204,16 @@ C-ENUM:
|
|||
"cairo_t*" "cairo" "cairo_create" [ "void*" ] alien-invoke ;
|
||||
|
||||
: cairo_reference ( cairo_t -- cairo_t )
|
||||
"cairo_t*" "cairo" "cairo_reference" [ "cairo_t*" ] alien-invoke ;
|
||||
"cairo_t*" "cairo" "cairo_reference" [ "cairo_t*" ] alien-invoke ;
|
||||
|
||||
: cairo_destroy ( cairo_t -- )
|
||||
"void" "cairo" "cairo_destroy" [ "cairo_t*" ] alien-invoke ;
|
||||
|
||||
: cairo_save ( cairo_t -- )
|
||||
"void" "cairo" "cairo_save" [ "cairo_t*" ] alien-invoke ;
|
||||
"void" "cairo" "cairo_save" [ "cairo_t*" ] alien-invoke ;
|
||||
|
||||
: cairo_restore ( cairo_t -- )
|
||||
"void" "cairo" "cairo_restore" [ "cairo_t*" ] alien-invoke ;
|
||||
"void" "cairo" "cairo_restore" [ "cairo_t*" ] alien-invoke ;
|
||||
|
||||
: cairo_set_operator ( cairo_t cairo_operator_t -- )
|
||||
"void" "cairo" "cairo_set_operator" [ "cairo_t*" "int" ] alien-invoke ;
|
||||
|
@ -268,13 +268,13 @@ C-ENUM:
|
|||
"void" "cairo" "cairo_rotate" [ "cairo_t*" "double" ] alien-invoke ;
|
||||
|
||||
: cairo_transform ( cairo_t cairo_matrix_t -- )
|
||||
"void" "cairo" "cairo_transform" [ "cairo_t*" "cairo_matrix_t*" ] alien-invoke ;
|
||||
"void" "cairo" "cairo_transform" [ "cairo_t*" "cairo_matrix_t*" ] alien-invoke ;
|
||||
|
||||
: cairo_set_matrix ( cairo_t cairo_matrix_t -- )
|
||||
"void" "cairo" "cairo_set_matrix" [ "cairo_t*" "cairo_matrix_t*" ] alien-invoke ;
|
||||
"void" "cairo" "cairo_set_matrix" [ "cairo_t*" "cairo_matrix_t*" ] alien-invoke ;
|
||||
|
||||
: cairo_identity_matrix ( cairo_t -- )
|
||||
"void" "cairo" "cairo_identity_matrix" [ "cairo_t*" ] alien-invoke ;
|
||||
"void" "cairo" "cairo_identity_matrix" [ "cairo_t*" ] alien-invoke ;
|
||||
|
||||
! cairo path creating functions
|
||||
|
||||
|
@ -415,10 +415,10 @@ C-ENUM:
|
|||
"void" "cairo" "cairo_set_font_size" [ "cairo_t*" "double" ] alien-invoke ;
|
||||
|
||||
: cairo_set_font_matrix ( cairo_t cairo_matrix_t -- )
|
||||
"void" "cairo" "cairo_set_font_matrix" [ "cairo_t*" "cairo_matrix_t*" ] alien-invoke ;
|
||||
"void" "cairo" "cairo_set_font_matrix" [ "cairo_t*" "cairo_matrix_t*" ] alien-invoke ;
|
||||
|
||||
: cairo_get_font_matrix ( cairo_t cairo_matrix_t -- )
|
||||
"void" "cairo" "cairo_get_font_matrix" [ "cairo_t*" "cairo_matrix_t*" ] alien-invoke ;
|
||||
"void" "cairo" "cairo_get_font_matrix" [ "cairo_t*" "cairo_matrix_t*" ] alien-invoke ;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -94,9 +94,9 @@ VAR: threshold
|
|||
|
||||
: gl-flip ( angle -- ) deg>rad dup dup dup
|
||||
[ 2 * cos , 2 * sin , 0 , 0 ,
|
||||
2 * sin , 2 * cos neg , 0 , 0 ,
|
||||
2 * sin , 2 * cos neg , 0 , 0 ,
|
||||
0 , 0 , 1 , 0 ,
|
||||
0 , 0 , 0 , 1 , ]
|
||||
0 , 0 , 0 , 1 , ]
|
||||
{ } make >c-double-array glMultMatrixd ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
|
|
@ -9,9 +9,9 @@ iterate? [
|
|||
{ { 1 [ circle
|
||||
[ .23 y .99 s .002 b tentacle ] do ] }
|
||||
{ 1 [ circle
|
||||
[ .17 y 2 r .99 s .002 b tentacle ] do ] }
|
||||
[ .17 y 2 r .99 s .002 b tentacle ] do ] }
|
||||
{ 1 [ circle
|
||||
[ .12 y -2 r .99 s .001 b tentacle ] do ] } }
|
||||
[ .12 y -2 r .99 s .001 b tentacle ] do ] } }
|
||||
call-random-weighted
|
||||
] when ;
|
||||
|
||||
|
|
|
@ -9,18 +9,18 @@ DEFER: white
|
|||
|
||||
: black ( -- ) iterate? [
|
||||
{ { 60 [ [ 0.6 s circle ] do
|
||||
[ 0.1 x 5 r 0.99 s -0.01 b -0.01 a black ] do ] }
|
||||
[ 0.1 x 5 r 0.99 s -0.01 b -0.01 a black ] do ] }
|
||||
{ 1 [ white black ] } }
|
||||
call-random-weighted
|
||||
] when ;
|
||||
|
||||
: white ( -- ) iterate? [
|
||||
{ { 60 [
|
||||
[ 0.6 s circle ] do
|
||||
[ 0.1 x -5 r 0.99 s 0.01 b -0.01 a white ] do
|
||||
[ 0.6 s circle ] do
|
||||
[ 0.1 x -5 r 0.99 s 0.01 b -0.01 a white ] do
|
||||
] }
|
||||
{ 1 [
|
||||
black white
|
||||
black white
|
||||
] } }
|
||||
call-random-weighted
|
||||
] when ;
|
||||
|
|
|
@ -24,8 +24,8 @@ DEFER: start
|
|||
|
||||
: spiral ( -- ) iterate? [
|
||||
{ { 1 [ f-squares
|
||||
[ 0.5 x 0.5 y 45 r f-triangles ] do
|
||||
[ 1 y 25 r 0.9 s spiral ] do ] }
|
||||
[ 0.5 x 0.5 y 45 r f-triangles ] do
|
||||
[ 1 y 25 r 0.9 s spiral ] do ] }
|
||||
{ 0.022 [ [ 90 flip 50 hue start ] do ] } }
|
||||
call-random-weighted
|
||||
] when ;
|
||||
|
|
|
@ -73,7 +73,7 @@ DEFER: tree
|
|||
iterate? [
|
||||
{
|
||||
{ 20 [ [ 0.25 size circle ] do
|
||||
[ 0.1 y 0.97 size tree ] do ] }
|
||||
[ 0.1 y 0.97 size tree ] do ] }
|
||||
{ 1.5 [ branch ] }
|
||||
} random-weighted* do
|
||||
] when ;
|
||||
|
|
|
@ -7,11 +7,11 @@ IN: cfdg.models.snowflake
|
|||
: spike ( -- )
|
||||
iterate? [
|
||||
{ { 1 [ square
|
||||
[ 0.95 y 0.97 s spike ] do ] }
|
||||
[ 0.95 y 0.97 s spike ] do ] }
|
||||
{ 0.03 [ square
|
||||
[ 60 r spike ] do
|
||||
[ -60 r spike ] do
|
||||
[ 0.95 y 0.97 s spike ] do ] } }
|
||||
[ 60 r spike ] do
|
||||
[ -60 r spike ] do
|
||||
[ 0.95 y 0.97 s spike ] do ] } }
|
||||
call-random-weighted
|
||||
] when ;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ HELP: (mailbox-block-unless-pred)
|
|||
|
||||
HELP: (mailbox-block-if-empty)
|
||||
{ $values { "mailbox" "a mailbox object" }
|
||||
{ "mailbox2" "same object as 'mailbox'" }
|
||||
{ "mailbox2" "same object as 'mailbox'" }
|
||||
{ "timeout" "a timeout in milliseconds" }
|
||||
}
|
||||
{ $description "Block the thread if the mailbox is empty." }
|
||||
|
@ -41,21 +41,21 @@ HELP: (mailbox-block-if-empty)
|
|||
|
||||
HELP: mailbox-get
|
||||
{ $values { "mailbox" "a mailbox object" }
|
||||
{ "obj" "an object" }
|
||||
{ "obj" "an object" }
|
||||
}
|
||||
{ $description "Get the first item put into the mailbox. If it is empty the thread blocks until an item is put into it. The thread then resumes, leaving the item on the stack." }
|
||||
{ $see-also make-mailbox mailbox-empty? mailbox-put while-mailbox-empty mailbox-get-all mailbox-get? } ;
|
||||
|
||||
HELP: mailbox-get-all
|
||||
{ $values { "mailbox" "a mailbox object" }
|
||||
{ "array" "an array" }
|
||||
{ "array" "an array" }
|
||||
}
|
||||
{ $description "Blocks the thread if the mailbox is empty, otherwise removes all objects in the mailbox and returns an array containing the objects." }
|
||||
{ $see-also make-mailbox mailbox-empty? mailbox-put while-mailbox-empty mailbox-get-all mailbox-get? } ;
|
||||
|
||||
HELP: while-mailbox-empty
|
||||
{ $values { "mailbox" "a mailbox object" }
|
||||
{ "quot" "a quotation with stack effect " { $snippet "( -- )" } }
|
||||
{ "quot" "a quotation with stack effect " { $snippet "( -- )" } }
|
||||
}
|
||||
{ $description "Repeatedly call the quotation while there are no items in the mailbox. Quotation should have stack effect " { $snippet "( -- )" } "." }
|
||||
{ $see-also make-mailbox mailbox-empty? mailbox-put mailbox-get mailbox-get-all mailbox-get? } ;
|
||||
|
@ -63,7 +63,7 @@ HELP: while-mailbox-empty
|
|||
HELP: mailbox-get?
|
||||
{ $values { "pred" "a quotation with stack effect " { $snippet "( X -- bool )" } }
|
||||
{ "mailbox" "a mailbox object" }
|
||||
{ "obj" "an object" }
|
||||
{ "obj" "an object" }
|
||||
}
|
||||
{ $description "Get the first item in the mailbox which satisfies the predicate. 'pred' will be called repeatedly for each item in the mailbox. When 'pred' returns true that item will be returned. If nothing in the mailbox satisfies the predicate then the thread will block until something does. 'pred' must have stack effect " { $snippet "( X -- bool }" } "." }
|
||||
{ $see-also make-mailbox mailbox-empty? mailbox-put mailbox-get mailbox-get-all while-mailbox-empty } ;
|
||||
|
|
|
@ -59,7 +59,7 @@ SYMBOL: session
|
|||
cryptEnd check-result ;
|
||||
|
||||
: with-cryptlib ( quot -- )
|
||||
[ init [ end ] [ ] cleanup ] with-scope ; inline
|
||||
[ init [ end ] [ ] cleanup ] with-scope ; inline
|
||||
|
||||
! =========================================================
|
||||
! Create and destroy an encryption context
|
||||
|
@ -71,10 +71,10 @@ SYMBOL: session
|
|||
|
||||
: destroy-context ( -- )
|
||||
context get [ *int cryptDestroyContext check-result ] when*
|
||||
context off ;
|
||||
context off ;
|
||||
|
||||
: with-context ( algo quot -- )
|
||||
swap create-context [ destroy-context ] [ ] cleanup ; inline
|
||||
swap create-context [ destroy-context ] [ ] cleanup ; inline
|
||||
|
||||
! =========================================================
|
||||
! Keyset routines
|
||||
|
@ -86,10 +86,10 @@ SYMBOL: session
|
|||
|
||||
: close-keyset ( -- )
|
||||
keyset get *int cryptKeysetClose check-result
|
||||
destroy-context ;
|
||||
destroy-context ;
|
||||
|
||||
: with-keyset ( type name options quot -- )
|
||||
>r open-keyset r> [ close-keyset ] [ ] cleanup ; inline
|
||||
>r open-keyset r> [ close-keyset ] [ ] cleanup ; inline
|
||||
|
||||
: get-public-key ( idtype id -- )
|
||||
>r >r keyset get *int "int*" <c-object> tuck r> r> string>char-alien
|
||||
|
@ -128,7 +128,7 @@ SYMBOL: session
|
|||
certificate get *int cryptDestroyCert check-result ;
|
||||
|
||||
: with-certificate ( type quot -- )
|
||||
swap create-certificate [ destroy-certificate ] [ ] cleanup ; inline
|
||||
swap create-certificate [ destroy-certificate ] [ ] cleanup ; inline
|
||||
|
||||
: sign-certificate ( -- )
|
||||
certificate get *int context get *int cryptSignCert check-result ;
|
||||
|
@ -175,7 +175,7 @@ SYMBOL: session
|
|||
envelope get *int cryptDestroyEnvelope check-result ;
|
||||
|
||||
: with-envelope ( format quot -- )
|
||||
swap create-envelope [ destroy-envelope ] [ ] cleanup ;
|
||||
swap create-envelope [ destroy-envelope ] [ ] cleanup ;
|
||||
|
||||
: create-session ( format -- )
|
||||
>r "int" <c-object> dup swap CRYPT_UNUSED r> cryptCreateSession
|
||||
|
@ -185,7 +185,7 @@ SYMBOL: session
|
|||
session get *int cryptDestroySession check-result ;
|
||||
|
||||
: with-session ( format quot -- )
|
||||
swap create-session [ destroy-session ] [ ] cleanup ;
|
||||
swap create-session [ destroy-session ] [ ] cleanup ;
|
||||
|
||||
: push-data ( handle buffer length -- )
|
||||
>r >r *int r> r> "int" <c-object> [ cryptPushData ]
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
USING: assocs html.parser kernel math sequences strings ;
|
||||
USING: assocs html.parser kernel math sequences strings unicode.categories
|
||||
unicode.case ;
|
||||
IN: html.parser.analyzer
|
||||
|
||||
: remove-blank-text ( vector -- vector' )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
USING: arrays html.parser.utils hashtables io kernel
|
||||
namespaces prettyprint quotations
|
||||
sequences splitting state-parser strings ;
|
||||
sequences splitting state-parser strings unicode.categories unicode.case ;
|
||||
IN: html.parser
|
||||
|
||||
TUPLE: tag name attributes text matched? closing? ;
|
||||
|
|
|
@ -123,7 +123,7 @@ DEFER: (d)
|
|||
[ drop H{ } ] [ unclip swap [ x.dy ] 2keep dx.y alt+ ] if ;
|
||||
|
||||
: linear-op ( vec quot -- vec )
|
||||
[
|
||||
[
|
||||
[
|
||||
-rot >r swap call r> alt*n (alt+)
|
||||
] curry assoc-each
|
||||
|
|
|
@ -19,7 +19,7 @@ VAR: accum
|
|||
: (rewrite) ( slice -- )
|
||||
{ { [ empty? ] [ drop ] }
|
||||
{ [ has-param? ] [ next+rest* [ push-next ] [ (rewrite) ] bi* ] }
|
||||
{ [ t ] [ next+rest [ push-next ] [ (rewrite) ] bi* ] } }
|
||||
{ [ t ] [ next+rest [ push-next ] [ (rewrite) ] bi* ] } }
|
||||
switch ;
|
||||
|
||||
: rewrite ( string -- string )
|
||||
|
|
|
@ -54,7 +54,7 @@ MACRO: match-cond ( assoc -- )
|
|||
|
||||
: replace-patterns ( object -- result )
|
||||
{
|
||||
{ [ dup number? ] [ ] }
|
||||
{ [ dup number? ] [ ] }
|
||||
{ [ dup match-var? ] [ get ] }
|
||||
{ [ dup sequence? ] [ [ replace-patterns ] map ] }
|
||||
{ [ dup tuple? ] [ tuple>array replace-patterns >tuple ] }
|
||||
|
|
|
@ -104,7 +104,7 @@ FUNCTION: int ogg_stream_flush ( ogg_stream_state* os, ogg_page* og ) ;
|
|||
FUNCTION: int ogg_sync_init ( ogg_sync_state* oy ) ;
|
||||
FUNCTION: int ogg_sync_clear ( ogg_sync_state* oy ) ;
|
||||
FUNCTION: int ogg_sync_reset ( ogg_sync_state* oy ) ;
|
||||
FUNCTION: int ogg_sync_destroy ( ogg_sync_state* oy ) ;
|
||||
FUNCTION: int ogg_sync_destroy ( ogg_sync_state* oy ) ;
|
||||
|
||||
FUNCTION: void* ogg_sync_buffer ( ogg_sync_state* oy, long size ) ;
|
||||
FUNCTION: int ogg_sync_wrote ( ogg_sync_state* oy, long bytes ) ;
|
||||
|
|
|
@ -100,19 +100,19 @@ FUNCTION: double vorbis_granule_time ( vorbis_dsp_state* v, longlong granulepo
|
|||
FUNCTION: int vorbis_analysis_init ( vorbis_dsp_state* v, vorbis_info* vi ) ;
|
||||
FUNCTION: int vorbis_commentheader_out ( vorbis_comment* vc, ogg_packet* op ) ;
|
||||
FUNCTION: int vorbis_analysis_headerout ( vorbis_dsp_state* v,
|
||||
vorbis_comment* vc,
|
||||
ogg_packet* op,
|
||||
ogg_packet* op_comm,
|
||||
ogg_packet* op_code ) ;
|
||||
vorbis_comment* vc,
|
||||
ogg_packet* op,
|
||||
ogg_packet* op_comm,
|
||||
ogg_packet* op_code ) ;
|
||||
FUNCTION: float** vorbis_analysis_buffer ( vorbis_dsp_state* v, int vals ) ;
|
||||
FUNCTION: int vorbis_analysis_wrote ( vorbis_dsp_state* v, int vals ) ;
|
||||
FUNCTION: int vorbis_analysis_blockout ( vorbis_dsp_state* v, vorbis_block* vb ) ;
|
||||
FUNCTION: int vorbis_analysis ( vorbis_block* vb, ogg_packet* op ) ;
|
||||
FUNCTION: int vorbis_bitrate_addblock ( vorbis_block* vb ) ;
|
||||
FUNCTION: int vorbis_bitrate_flushpacket ( vorbis_dsp_state* vd,
|
||||
ogg_packet* op ) ;
|
||||
ogg_packet* op ) ;
|
||||
FUNCTION: int vorbis_synthesis_headerin ( vorbis_info* vi, vorbis_comment* vc,
|
||||
ogg_packet* op ) ;
|
||||
ogg_packet* op ) ;
|
||||
FUNCTION: int vorbis_synthesis_init ( vorbis_dsp_state* v, vorbis_info* vi ) ;
|
||||
FUNCTION: int vorbis_synthesis_restart ( vorbis_dsp_state* v ) ;
|
||||
FUNCTION: int vorbis_synthesis ( vorbis_block* vb, ogg_packet* op ) ;
|
||||
|
|
|
@ -1014,7 +1014,7 @@ FUNCTION: void glTexImage1D ( GLenum target, GLint level, GLint internalFormat,
|
|||
|
||||
FUNCTION: void glTexImage2D ( GLenum target, GLint level, GLint internalFormat,
|
||||
GLsizei width, GLsizei height, GLint border,
|
||||
GLenum format, GLenum type, GLvoid* pixels ) ;
|
||||
GLenum format, GLenum type, GLvoid* pixels ) ;
|
||||
|
||||
FUNCTION: void glGetTexImage ( GLenum target, GLint level, GLenum format,
|
||||
GLenum type, GLvoid* pixels ) ;
|
||||
|
@ -1039,14 +1039,14 @@ FUNCTION: void glTexSubImage1D ( GLenum target, GLint level, GLint xoffset, GLsi
|
|||
|
||||
FUNCTION: void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height, GLenum format,
|
||||
GLenum type, GLvoid* pixels ) ;
|
||||
GLenum type, GLvoid* pixels ) ;
|
||||
|
||||
FUNCTION: void glCopyTexImage1D ( GLenum target, GLint level, GLenum internalformat,
|
||||
GLint x, GLint y, GLsizei width, GLint border ) ;
|
||||
|
||||
FUNCTION: void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat,
|
||||
GLint x, GLint y,
|
||||
GLsizei width, GLsizei height, GLint border ) ;
|
||||
GLsizei width, GLsizei height, GLint border ) ;
|
||||
|
||||
FUNCTION: void glCopyTexSubImage1D ( GLenum target, GLint level, GLint xoffset,
|
||||
GLint x, GLint y, GLsizei width ) ;
|
||||
|
@ -1064,10 +1064,10 @@ FUNCTION: void glMap1f ( GLenum target, GLfloat u1, GLfloat u2,
|
|||
|
||||
FUNCTION: void glMap2d ( GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
|
||||
GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
|
||||
GLdouble* points ) ;
|
||||
GLdouble* points ) ;
|
||||
FUNCTION: void glMap2f ( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
|
||||
GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
|
||||
GLfloat* points ) ;
|
||||
GLfloat* points ) ;
|
||||
|
||||
FUNCTION: void glGetMapdv ( GLenum target, GLenum query, GLdouble* v ) ;
|
||||
FUNCTION: void glGetMapfv ( GLenum target, GLenum query, GLfloat* v ) ;
|
||||
|
|
|
@ -25,19 +25,19 @@ C: <ori> ori
|
|||
! `Computer Graphics: Principles and Practice'
|
||||
|
||||
: Rz ( angle -- Rx ) deg>rad
|
||||
[ dup cos , dup sin neg , 0 ,
|
||||
dup sin , dup cos , 0 ,
|
||||
0 , 0 , 1 , ] 3 make-matrix nip ;
|
||||
[ dup cos , dup sin neg , 0 ,
|
||||
dup sin , dup cos , 0 ,
|
||||
0 , 0 , 1 , ] 3 make-matrix nip ;
|
||||
|
||||
: Ry ( angle -- Ry ) deg>rad
|
||||
[ dup cos , 0 , dup sin ,
|
||||
0 , 1 , 0 ,
|
||||
dup sin neg , 0 , dup cos , ] 3 make-matrix nip ;
|
||||
[ dup cos , 0 , dup sin ,
|
||||
0 , 1 , 0 ,
|
||||
dup sin neg , 0 , dup cos , ] 3 make-matrix nip ;
|
||||
|
||||
: Rx ( angle -- Rz ) deg>rad
|
||||
[ 1 , 0 , 0 ,
|
||||
0 , dup cos , dup sin neg ,
|
||||
0 , dup sin , dup cos , ] 3 make-matrix nip ;
|
||||
[ 1 , 0 , 0 ,
|
||||
0 , dup cos , dup sin neg ,
|
||||
0 , dup sin , dup cos , ] 3 make-matrix nip ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
|
|
@ -17,44 +17,44 @@ IN: postgresql.libpq
|
|||
>>
|
||||
|
||||
! ConnSatusType
|
||||
: CONNECTION_OK HEX: 0 ; inline
|
||||
: CONNECTION_BAD HEX: 1 ; inline
|
||||
: CONNECTION_STARTED HEX: 2 ; inline
|
||||
: CONNECTION_MADE HEX: 3 ; inline
|
||||
: CONNECTION_AWAITING_RESPONSE HEX: 4 ; inline
|
||||
: CONNECTION_AUTH_OK HEX: 5 ; inline
|
||||
: CONNECTION_SETENV HEX: 6 ; inline
|
||||
: CONNECTION_SSL_STARTUP HEX: 7 ; inline
|
||||
: CONNECTION_NEEDED HEX: 8 ; inline
|
||||
: CONNECTION_OK HEX: 0 ; inline
|
||||
: CONNECTION_BAD HEX: 1 ; inline
|
||||
: CONNECTION_STARTED HEX: 2 ; inline
|
||||
: CONNECTION_MADE HEX: 3 ; inline
|
||||
: CONNECTION_AWAITING_RESPONSE HEX: 4 ; inline
|
||||
: CONNECTION_AUTH_OK HEX: 5 ; inline
|
||||
: CONNECTION_SETENV HEX: 6 ; inline
|
||||
: CONNECTION_SSL_STARTUP HEX: 7 ; inline
|
||||
: CONNECTION_NEEDED HEX: 8 ; inline
|
||||
|
||||
! PostgresPollingStatusType
|
||||
: PGRES_POLLING_FAILED HEX: 0 ; inline
|
||||
: PGRES_POLLING_READING HEX: 1 ; inline
|
||||
: PGRES_POLLING_WRITING HEX: 2 ; inline
|
||||
: PGRES_POLLING_OK HEX: 3 ; inline
|
||||
: PGRES_POLLING_ACTIVE HEX: 4 ; inline
|
||||
: PGRES_POLLING_FAILED HEX: 0 ; inline
|
||||
: PGRES_POLLING_READING HEX: 1 ; inline
|
||||
: PGRES_POLLING_WRITING HEX: 2 ; inline
|
||||
: PGRES_POLLING_OK HEX: 3 ; inline
|
||||
: PGRES_POLLING_ACTIVE HEX: 4 ; inline
|
||||
|
||||
! ExecStatusType;
|
||||
: PGRES_EMPTY_QUERY HEX: 0 ; inline
|
||||
: PGRES_COMMAND_OK HEX: 1 ; inline
|
||||
: PGRES_TUPLES_OK HEX: 2 ; inline
|
||||
: PGRES_COPY_OUT HEX: 3 ; inline
|
||||
: PGRES_COPY_IN HEX: 4 ; inline
|
||||
: PGRES_BAD_RESPONSE HEX: 5 ; inline
|
||||
: PGRES_NONFATAL_ERROR HEX: 6 ; inline
|
||||
: PGRES_FATAL_ERROR HEX: 7 ; inline
|
||||
: PGRES_EMPTY_QUERY HEX: 0 ; inline
|
||||
: PGRES_COMMAND_OK HEX: 1 ; inline
|
||||
: PGRES_TUPLES_OK HEX: 2 ; inline
|
||||
: PGRES_COPY_OUT HEX: 3 ; inline
|
||||
: PGRES_COPY_IN HEX: 4 ; inline
|
||||
: PGRES_BAD_RESPONSE HEX: 5 ; inline
|
||||
: PGRES_NONFATAL_ERROR HEX: 6 ; inline
|
||||
: PGRES_FATAL_ERROR HEX: 7 ; inline
|
||||
|
||||
! PGTransactionStatusType;
|
||||
: PQTRANS_IDLE HEX: 0 ; inline
|
||||
: PQTRANS_ACTIVE HEX: 1 ; inline
|
||||
: PQTRANS_INTRANS HEX: 2 ; inline
|
||||
: PQTRANS_INERROR HEX: 3 ; inline
|
||||
: PQTRANS_UNKNOWN HEX: 4 ; inline
|
||||
: PQTRANS_IDLE HEX: 0 ; inline
|
||||
: PQTRANS_ACTIVE HEX: 1 ; inline
|
||||
: PQTRANS_INTRANS HEX: 2 ; inline
|
||||
: PQTRANS_INERROR HEX: 3 ; inline
|
||||
: PQTRANS_UNKNOWN HEX: 4 ; inline
|
||||
|
||||
! PGVerbosity;
|
||||
: PQERRORS_TERSE HEX: 0 ; inline
|
||||
: PQERRORS_DEFAULT HEX: 1 ; inline
|
||||
: PQERRORS_VERBOSE HEX: 2 ; inline
|
||||
: PQERRORS_TERSE HEX: 0 ; inline
|
||||
: PQERRORS_DEFAULT HEX: 1 ; inline
|
||||
: PQERRORS_VERBOSE HEX: 2 ; inline
|
||||
|
||||
|
||||
TYPEDEF: int size_t
|
||||
|
@ -81,7 +81,7 @@ LIBRARY: postgresql
|
|||
|
||||
|
||||
! Exported functions of libpq
|
||||
! === in fe-connect.c ===
|
||||
! === in fe-connect.c ===
|
||||
|
||||
! make a new client connection to the backend
|
||||
! Asynchronous (non-blocking)
|
||||
|
@ -91,12 +91,12 @@ FUNCTION: PostgresPollingStatusType PQconnectPoll ( PGconn* conn ) ;
|
|||
! Synchronous (blocking)
|
||||
FUNCTION: PGconn* PQconnectdb ( char* conninfo ) ;
|
||||
FUNCTION: PGconn* PQsetdbLogin ( char* pghost, char* pgport,
|
||||
char* pgoptions, char* pgtty,
|
||||
char* dbName,
|
||||
char* login, char* pwd ) ;
|
||||
char* pgoptions, char* pgtty,
|
||||
char* dbName,
|
||||
char* login, char* pwd ) ;
|
||||
|
||||
: PQsetdb ( M_PGHOST M_PGPORT M_PGOPT M_PGTTY M_DBNAME -- PGconn* )
|
||||
f f PQsetdbLogin ;
|
||||
f f PQsetdbLogin ;
|
||||
|
||||
! close the current connection and free the PGconn data structure
|
||||
FUNCTION: void PQfinish ( PGconn* conn ) ;
|
||||
|
@ -112,7 +112,7 @@ FUNCTION: void PQconninfoFree ( PQconninfoOption* connOptions ) ;
|
|||
! parameters
|
||||
!
|
||||
! Asynchronous (non-blocking)
|
||||
FUNCTION: int PQresetStart ( PGconn* conn ) ;
|
||||
FUNCTION: int PQresetStart ( PGconn* conn ) ;
|
||||
FUNCTION: PostgresPollingStatusType PQresetPoll ( PGconn* conn ) ;
|
||||
|
||||
! Synchronous (blocking)
|
||||
|
@ -125,7 +125,7 @@ FUNCTION: PGcancel* PQgetCancel ( PGconn* conn ) ;
|
|||
FUNCTION: void PQfreeCancel ( PGcancel* cancel ) ;
|
||||
|
||||
! issue a cancel request
|
||||
FUNCTION: int PQrequestCancel ( PGconn* conn ) ;
|
||||
FUNCTION: int PQrequestCancel ( PGconn* conn ) ;
|
||||
|
||||
! Accessor functions for PGconn objects
|
||||
FUNCTION: char* PQdb ( PGconn* conn ) ;
|
||||
|
@ -138,14 +138,14 @@ FUNCTION: char* PQoptions ( PGconn* conn ) ;
|
|||
FUNCTION: ConnStatusType PQstatus ( PGconn* conn ) ;
|
||||
FUNCTION: PGTransactionStatusType PQtransactionStatus ( PGconn* conn ) ;
|
||||
FUNCTION: char* PQparameterStatus ( PGconn* conn,
|
||||
char* paramName ) ;
|
||||
FUNCTION: int PQprotocolVersion ( PGconn* conn ) ;
|
||||
FUNCTION: int PQServerVersion ( PGconn* conn ) ;
|
||||
char* paramName ) ;
|
||||
FUNCTION: int PQprotocolVersion ( PGconn* conn ) ;
|
||||
FUNCTION: int PQServerVersion ( PGconn* conn ) ;
|
||||
FUNCTION: char* PQerrorMessage ( PGconn* conn ) ;
|
||||
FUNCTION: int PQsocket ( PGconn* conn ) ;
|
||||
FUNCTION: int PQbackendPID ( PGconn* conn ) ;
|
||||
FUNCTION: int PQclientEncoding ( PGconn* conn ) ;
|
||||
FUNCTION: int PQsetClientEncoding ( PGconn* conn, char* encoding ) ;
|
||||
FUNCTION: int PQsocket ( PGconn* conn ) ;
|
||||
FUNCTION: int PQbackendPID ( PGconn* conn ) ;
|
||||
FUNCTION: int PQclientEncoding ( PGconn* conn ) ;
|
||||
FUNCTION: int PQsetClientEncoding ( PGconn* conn, char* encoding ) ;
|
||||
|
||||
! May not be compiled into libpq
|
||||
! Get the SSL structure associated with a connection
|
||||
|
@ -156,7 +156,7 @@ FUNCTION: void PQinitSSL ( int do_init ) ;
|
|||
|
||||
! Set verbosity for PQerrorMessage and PQresultErrorMessage
|
||||
FUNCTION: PGVerbosity PQsetErrorVerbosity ( PGconn* conn,
|
||||
PGVerbosity verbosity ) ;
|
||||
PGVerbosity verbosity ) ;
|
||||
|
||||
! Enable/disable tracing
|
||||
FUNCTION: void PQtrace ( PGconn* conn, FILE* debug_port ) ;
|
||||
|
@ -171,11 +171,11 @@ FUNCTION: void PQuntrace ( PGconn* conn ) ;
|
|||
|
||||
! Override default notice handling routines
|
||||
! FUNCTION: PQnoticeReceiver PQsetNoticeReceiver ( PGconn* conn,
|
||||
! PQnoticeReceiver proc,
|
||||
! void* arg ) ;
|
||||
! PQnoticeReceiver proc,
|
||||
! void* arg ) ;
|
||||
! FUNCTION: PQnoticeProcessor PQsetNoticeProcessor ( PGconn* conn,
|
||||
! PQnoticeProcessor proc,
|
||||
! void* arg ) ;
|
||||
! PQnoticeProcessor proc,
|
||||
! void* arg ) ;
|
||||
! END BROKEN
|
||||
|
||||
! === in fe-exec.c ===
|
||||
|
@ -183,107 +183,107 @@ FUNCTION: void PQuntrace ( PGconn* conn ) ;
|
|||
! Simple synchronous query
|
||||
FUNCTION: PGresult* PQexec ( PGconn* conn, char* query ) ;
|
||||
FUNCTION: PGresult* PQexecParams ( PGconn* conn,
|
||||
char* command,
|
||||
int nParams,
|
||||
Oid* paramTypes,
|
||||
char** paramValues,
|
||||
int* paramLengths,
|
||||
int* paramFormats,
|
||||
int resultFormat ) ;
|
||||
char* command,
|
||||
int nParams,
|
||||
Oid* paramTypes,
|
||||
char** paramValues,
|
||||
int* paramLengths,
|
||||
int* paramFormats,
|
||||
int resultFormat ) ;
|
||||
FUNCTION: PGresult* PQprepare ( PGconn* conn, char* stmtName,
|
||||
char* query, int nParams,
|
||||
Oid* paramTypes ) ;
|
||||
FUNCTION: PGresult* PQexecPrepared ( PGconn* conn,
|
||||
char* stmtName,
|
||||
int nParams,
|
||||
char** paramValues,
|
||||
int* paramLengths,
|
||||
int* paramFormats,
|
||||
int resultFormat ) ;
|
||||
char* stmtName,
|
||||
int nParams,
|
||||
char** paramValues,
|
||||
int* paramLengths,
|
||||
int* paramFormats,
|
||||
int resultFormat ) ;
|
||||
|
||||
! Interface for multiple-result or asynchronous queries
|
||||
FUNCTION: int PQsendQuery ( PGconn* conn, char* query ) ;
|
||||
FUNCTION: int PQsendQueryParams ( PGconn* conn,
|
||||
char* command,
|
||||
int nParams,
|
||||
Oid* paramTypes,
|
||||
char** paramValues,
|
||||
int* paramLengths,
|
||||
int* paramFormats,
|
||||
int resultFormat ) ;
|
||||
char* command,
|
||||
int nParams,
|
||||
Oid* paramTypes,
|
||||
char** paramValues,
|
||||
int* paramLengths,
|
||||
int* paramFormats,
|
||||
int resultFormat ) ;
|
||||
FUNCTION: PGresult* PQsendPrepare ( PGconn* conn, char* stmtName,
|
||||
char* query, int nParams,
|
||||
Oid* paramTypes ) ;
|
||||
FUNCTION: int PQsendQueryPrepared ( PGconn* conn,
|
||||
char* stmtName,
|
||||
int nParams,
|
||||
char** paramValues,
|
||||
int *paramLengths,
|
||||
int *paramFormats,
|
||||
int resultFormat ) ;
|
||||
char* stmtName,
|
||||
int nParams,
|
||||
char** paramValues,
|
||||
int *paramLengths,
|
||||
int *paramFormats,
|
||||
int resultFormat ) ;
|
||||
FUNCTION: PGresult* PQgetResult ( PGconn* conn ) ;
|
||||
|
||||
! Routines for managing an asynchronous query
|
||||
FUNCTION: int PQisBusy ( PGconn* conn ) ;
|
||||
FUNCTION: int PQconsumeInput ( PGconn* conn ) ;
|
||||
FUNCTION: int PQisBusy ( PGconn* conn ) ;
|
||||
FUNCTION: int PQconsumeInput ( PGconn* conn ) ;
|
||||
|
||||
! LISTEN/NOTIFY support
|
||||
FUNCTION: PGnotify* PQnotifies ( PGconn* conn ) ;
|
||||
|
||||
! Routines for copy in/out
|
||||
FUNCTION: int PQputCopyData ( PGconn* conn, char* buffer, int nbytes ) ;
|
||||
FUNCTION: int PQputCopyEnd ( PGconn* conn, char* errormsg ) ;
|
||||
FUNCTION: int PQgetCopyData ( PGconn* conn, char** buffer, int async ) ;
|
||||
FUNCTION: int PQputCopyData ( PGconn* conn, char* buffer, int nbytes ) ;
|
||||
FUNCTION: int PQputCopyEnd ( PGconn* conn, char* errormsg ) ;
|
||||
FUNCTION: int PQgetCopyData ( PGconn* conn, char** buffer, int async ) ;
|
||||
|
||||
! Deprecated routines for copy in/out
|
||||
FUNCTION: int PQgetline ( PGconn* conn, char* string, int length ) ;
|
||||
FUNCTION: int PQputline ( PGconn* conn, char* string ) ;
|
||||
FUNCTION: int PQgetlineAsync ( PGconn* conn, char* buffer, int bufsize ) ;
|
||||
FUNCTION: int PQputnbytes ( PGconn* conn, char* buffer, int nbytes ) ;
|
||||
FUNCTION: int PQendcopy ( PGconn* conn ) ;
|
||||
FUNCTION: int PQgetline ( PGconn* conn, char* string, int length ) ;
|
||||
FUNCTION: int PQputline ( PGconn* conn, char* string ) ;
|
||||
FUNCTION: int PQgetlineAsync ( PGconn* conn, char* buffer, int bufsize ) ;
|
||||
FUNCTION: int PQputnbytes ( PGconn* conn, char* buffer, int nbytes ) ;
|
||||
FUNCTION: int PQendcopy ( PGconn* conn ) ;
|
||||
|
||||
! Set blocking/nonblocking connection to the backend
|
||||
FUNCTION: int PQsetnonblocking ( PGconn* conn, int arg ) ;
|
||||
FUNCTION: int PQisnonblocking ( PGconn* conn ) ;
|
||||
FUNCTION: int PQsetnonblocking ( PGconn* conn, int arg ) ;
|
||||
FUNCTION: int PQisnonblocking ( PGconn* conn ) ;
|
||||
|
||||
! Force the write buffer to be written (or at least try)
|
||||
FUNCTION: int PQflush ( PGconn* conn ) ;
|
||||
FUNCTION: int PQflush ( PGconn* conn ) ;
|
||||
|
||||
!
|
||||
! * "Fast path" interface --- not really recommended for application
|
||||
! * use
|
||||
!
|
||||
FUNCTION: PGresult* PQfn ( PGconn* conn,
|
||||
int fnid,
|
||||
int* result_buf,
|
||||
int* result_len,
|
||||
int result_is_int,
|
||||
PQArgBlock* args,
|
||||
int nargs ) ;
|
||||
int fnid,
|
||||
int* result_buf,
|
||||
int* result_len,
|
||||
int result_is_int,
|
||||
PQArgBlock* args,
|
||||
int nargs ) ;
|
||||
|
||||
! Accessor functions for PGresult objects
|
||||
FUNCTION: ExecStatusType PQresultStatus ( PGresult* res ) ;
|
||||
FUNCTION: char* PQresStatus ( ExecStatusType status ) ;
|
||||
FUNCTION: char* PQresultErrorMessage ( PGresult* res ) ;
|
||||
FUNCTION: char* PQresultErrorField ( PGresult* res, int fieldcode ) ;
|
||||
FUNCTION: int PQntuples ( PGresult* res ) ;
|
||||
FUNCTION: int PQnfields ( PGresult* res ) ;
|
||||
FUNCTION: int PQbinaryTuples ( PGresult* res ) ;
|
||||
FUNCTION: int PQntuples ( PGresult* res ) ;
|
||||
FUNCTION: int PQnfields ( PGresult* res ) ;
|
||||
FUNCTION: int PQbinaryTuples ( PGresult* res ) ;
|
||||
FUNCTION: char* PQfname ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQfnumber ( PGresult* res, char* field_name ) ;
|
||||
FUNCTION: Oid PQftable ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQftablecol ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQfformat ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: Oid PQftype ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQfsize ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQfmod ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQfnumber ( PGresult* res, char* field_name ) ;
|
||||
FUNCTION: Oid PQftable ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQftablecol ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQfformat ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: Oid PQftype ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQfsize ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: int PQfmod ( PGresult* res, int field_num ) ;
|
||||
FUNCTION: char* PQcmdStatus ( PGresult* res ) ;
|
||||
FUNCTION: char* PQoidStatus ( PGresult* res ) ;
|
||||
FUNCTION: Oid PQoidValue ( PGresult* res ) ;
|
||||
FUNCTION: Oid PQoidValue ( PGresult* res ) ;
|
||||
FUNCTION: char* PQcmdTuples ( PGresult* res ) ;
|
||||
FUNCTION: char* PQgetvalue ( PGresult* res, int tup_num, int field_num ) ;
|
||||
FUNCTION: int PQgetlength ( PGresult* res, int tup_num, int field_num ) ;
|
||||
FUNCTION: int PQgetisnull ( PGresult* res, int tup_num, int field_num ) ;
|
||||
FUNCTION: int PQgetlength ( PGresult* res, int tup_num, int field_num ) ;
|
||||
FUNCTION: int PQgetisnull ( PGresult* res, int tup_num, int field_num ) ;
|
||||
|
||||
! Delete a PGresult
|
||||
FUNCTION: void PQclear ( PGresult* res ) ;
|
||||
|
@ -313,7 +313,7 @@ FUNCTION: uchar* PQunescapeBytea ( uchar* strtext,
|
|||
! These forms are deprecated!
|
||||
FUNCTION: size_t PQescapeString ( void* to, char* from, size_t length ) ;
|
||||
FUNCTION: uchar* PQescapeBytea ( uchar* bintext, size_t binlen,
|
||||
size_t* bytealen ) ;
|
||||
size_t* bytealen ) ;
|
||||
|
||||
! === in fe-print.c ===
|
||||
|
||||
|
@ -321,41 +321,41 @@ FUNCTION: void PQprint ( FILE* fout, PGresult* res, PQprintOpt* ps ) ;
|
|||
|
||||
! really old printing routines
|
||||
FUNCTION: void PQdisplayTuples ( PGresult* res,
|
||||
FILE* fp,
|
||||
int fillAlign,
|
||||
char* fieldSep,
|
||||
int printHeader,
|
||||
int quiet ) ;
|
||||
FILE* fp,
|
||||
int fillAlign,
|
||||
char* fieldSep,
|
||||
int printHeader,
|
||||
int quiet ) ;
|
||||
|
||||
FUNCTION: void PQprintTuples ( PGresult* res,
|
||||
FILE* fout,
|
||||
int printAttName,
|
||||
int terseOutput,
|
||||
int width ) ;
|
||||
|
||||
FILE* fout,
|
||||
int printAttName,
|
||||
int terseOutput,
|
||||
int width ) ;
|
||||
|
||||
! === in fe-lobj.c ===
|
||||
|
||||
! Large-object access routines
|
||||
FUNCTION: int lo_open ( PGconn* conn, Oid lobjId, int mode ) ;
|
||||
FUNCTION: int lo_close ( PGconn* conn, int fd ) ;
|
||||
FUNCTION: int lo_read ( PGconn* conn, int fd, char* buf, size_t len ) ;
|
||||
FUNCTION: int lo_write ( PGconn* conn, int fd, char* buf, size_t len ) ;
|
||||
FUNCTION: int lo_lseek ( PGconn* conn, int fd, int offset, int whence ) ;
|
||||
FUNCTION: Oid lo_creat ( PGconn* conn, int mode ) ;
|
||||
! FUNCTION: Oid lo_creat ( PGconn* conn, Oid lobjId ) ;
|
||||
FUNCTION: int lo_tell ( PGconn* conn, int fd ) ;
|
||||
FUNCTION: int lo_unlink ( PGconn* conn, Oid lobjId ) ;
|
||||
FUNCTION: Oid lo_import ( PGconn* conn, char* filename ) ;
|
||||
FUNCTION: int lo_export ( PGconn* conn, Oid lobjId, char* filename ) ;
|
||||
FUNCTION: int lo_open ( PGconn* conn, Oid lobjId, int mode ) ;
|
||||
FUNCTION: int lo_close ( PGconn* conn, int fd ) ;
|
||||
FUNCTION: int lo_read ( PGconn* conn, int fd, char* buf, size_t len ) ;
|
||||
FUNCTION: int lo_write ( PGconn* conn, int fd, char* buf, size_t len ) ;
|
||||
FUNCTION: int lo_lseek ( PGconn* conn, int fd, int offset, int whence ) ;
|
||||
FUNCTION: Oid lo_creat ( PGconn* conn, int mode ) ;
|
||||
! FUNCTION: Oid lo_creat ( PGconn* conn, Oid lobjId ) ;
|
||||
FUNCTION: int lo_tell ( PGconn* conn, int fd ) ;
|
||||
FUNCTION: int lo_unlink ( PGconn* conn, Oid lobjId ) ;
|
||||
FUNCTION: Oid lo_import ( PGconn* conn, char* filename ) ;
|
||||
FUNCTION: int lo_export ( PGconn* conn, Oid lobjId, char* filename ) ;
|
||||
|
||||
! === in fe-misc.c ===
|
||||
|
||||
! Determine length of multibyte encoded char at *s
|
||||
FUNCTION: int PQmblen ( uchar* s, int encoding ) ;
|
||||
FUNCTION: int PQmblen ( uchar* s, int encoding ) ;
|
||||
|
||||
! Determine display length of multibyte encoded char at *s
|
||||
FUNCTION: int PQdsplen ( uchar* s, int encoding ) ;
|
||||
FUNCTION: int PQdsplen ( uchar* s, int encoding ) ;
|
||||
|
||||
! Get encoding id from environment variable PGCLIENTENCODING
|
||||
FUNCTION: int PQenv2encoding ( ) ;
|
||||
FUNCTION: int PQenv2encoding ( ) ;
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ C: <spring> spring
|
|||
{ [ dup below? ] [ bounce-bottom ] }
|
||||
{ [ dup beyond-left? ] [ bounce-left ] }
|
||||
{ [ dup beyond-right? ] [ bounce-right ] }
|
||||
{ [ t ] [ drop ] } }
|
||||
{ [ t ] [ drop ] } }
|
||||
cond ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
|
|
@ -51,10 +51,10 @@ DEFER: maybe-loop
|
|||
: springies-window* ( -- )
|
||||
|
||||
C[ display ] <slate> >slate
|
||||
{ 800 600 } slate> set-slate-dim
|
||||
{ 800 600 } slate> set-slate-dim
|
||||
C[ { 500 500 } >world-size loop on [ run ] in-thread ]
|
||||
slate> set-slate-graft
|
||||
C[ loop off ] slate> set-slate-ungraft
|
||||
C[ loop off ] slate> set-slate-ungraft
|
||||
|
||||
slate> "Springies" open-window ;
|
||||
|
||||
|
|
|
@ -18,24 +18,24 @@ HELP: sqlite-close
|
|||
|
||||
HELP: sqlite-last-insert-rowid
|
||||
{ $values { "db" "the database object" }
|
||||
{ "rowid" "the row number of the last insert" }
|
||||
{ "rowid" "the row number of the last insert" }
|
||||
}
|
||||
{ $description "Returns the number of the row of the last statement inserted into the database." }
|
||||
{ $see-also sqlite-open sqlite-close } ;
|
||||
|
||||
HELP: sqlite-prepare
|
||||
{ $values { "db" "the database object" }
|
||||
{ "sql" "the SQL statement as a string" }
|
||||
{ "statement" "the prepared SQL statement" }
|
||||
{ "sql" "the SQL statement as a string" }
|
||||
{ "statement" "the prepared SQL statement" }
|
||||
}
|
||||
{ $description "Internally compiles the SQL statement ready to be run by sqlite. The statement is executed and the results iterated over using " { $link sqlite-each } " and " { $link sqlite-map } ". The SQL statement can use named parameters which are later bound to values using " { $link sqlite-bind-text } " and " { $link sqlite-bind-text-by-name } "." }
|
||||
{ $see-also sqlite-open sqlite-close } ;
|
||||
|
||||
HELP: sqlite-bind-text
|
||||
{ $values { "statement" "a prepared SQL statement" }
|
||||
{ "index" "the index of the bound parameter in the SQL statement" }
|
||||
{ "text" "the string value to bind to that column" }
|
||||
|
||||
{ "index" "the index of the bound parameter in the SQL statement" }
|
||||
{ "text" "the string value to bind to that column" }
|
||||
|
||||
}
|
||||
{ $description "Binds the text to a parameter in the SQL statement. The parameter to be bound is identified by the index given and the indexes start from one." }
|
||||
{ $examples { $code "\"people.db\" sqlite-open\n\"select * from people where name=?\" sqlite-prepare\n1 \"chris\" sqlite-bind-text" } }
|
||||
|
@ -43,9 +43,9 @@ HELP: sqlite-bind-text
|
|||
|
||||
HELP: sqlite-bind-text-by-name
|
||||
{ $values { "statement" "a prepared SQL statement" }
|
||||
{ "name" "the name of the bound parameter in the SQL statement" }
|
||||
{ "text" "the string value to bind to that column" }
|
||||
|
||||
{ "name" "the name of the bound parameter in the SQL statement" }
|
||||
{ "text" "the string value to bind to that column" }
|
||||
|
||||
}
|
||||
{ $description "Binds the text to a parameter in the SQL statement. The parameter to be bound is identified by the given name." }
|
||||
{ $examples { $code "\"people.db\" sqlite-open\n\"select * from people where name=:name\" sqlite-prepare\n\"name\" \"chris\" sqlite-bind-text" } }
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<<<<<<< HEAD:extra/tar/tar.factor
|
||||
USING: combinators io io.files io.streams.duplex
|
||||
io.streams.string kernel math math.parser continuations
|
||||
namespaces pack prettyprint sequences strings system ;
|
||||
USING: hexdump tools.interpreter ;
|
||||
namespaces pack prettyprint sequences strings system
|
||||
hexdump tools.interpreter ;
|
||||
IN: tar
|
||||
|
||||
: zero-checksum 256 ;
|
||||
|
|
|
@ -39,8 +39,8 @@ TUPLE: search-field ;
|
|||
search-field H{
|
||||
{ T{ key-down f f "UP" } [ find-search-list select-previous ] }
|
||||
{ T{ key-down f f "DOWN" } [ find-search-list select-next ] }
|
||||
{ T{ key-down f f "PAGE_UP" } [ find-search-list list-page-up ] }
|
||||
{ T{ key-down f f "PAGE_DOWN" } [ find-search-list list-page-down ] }
|
||||
{ T{ key-down f f "PAGE_UP" } [ find-search-list list-page-up ] }
|
||||
{ T{ key-down f f "PAGE_DOWN" } [ find-search-list list-page-down ] }
|
||||
{ T{ key-down f f "RET" } [ find-search-list invoke-value-action ] }
|
||||
} set-gestures
|
||||
|
||||
|
|
|
@ -3,19 +3,19 @@ USING: alien.syntax ;
|
|||
|
||||
IN: unix.linux.fs
|
||||
|
||||
: MS_RDONLY 1 ; ! Mount read-only.
|
||||
: MS_NOSUID 2 ; ! Ignore suid and sgid bits.
|
||||
: MS_NODEV 4 ; ! Disallow access to device special files.
|
||||
: MS_NOEXEC 8 ; ! Disallow program execution.
|
||||
: MS_SYNCHRONOUS 16 ; ! Writes are synced at once.
|
||||
: MS_REMOUNT 32 ; ! Alter flags of a mounted FS.
|
||||
: MS_MANDLOCK 64 ; ! Allow mandatory locks on an FS.
|
||||
: S_WRITE 128 ; ! Write on file/directory/symlink.
|
||||
: S_APPEND 256 ; ! Append-only file.
|
||||
: S_IMMUTABLE 512 ; ! Immutable file.
|
||||
: MS_NOATIME 1024 ; ! Do not update access times.
|
||||
: MS_NODIRATIME 2048 ; ! Do not update directory access times.
|
||||
: MS_BIND 4096 ; ! Bind directory at different place.
|
||||
: MS_RDONLY 1 ; ! Mount read-only.
|
||||
: MS_NOSUID 2 ; ! Ignore suid and sgid bits.
|
||||
: MS_NODEV 4 ; ! Disallow access to device special files.
|
||||
: MS_NOEXEC 8 ; ! Disallow program execution.
|
||||
: MS_SYNCHRONOUS 16 ; ! Writes are synced at once.
|
||||
: MS_REMOUNT 32 ; ! Alter flags of a mounted FS.
|
||||
: MS_MANDLOCK 64 ; ! Allow mandatory locks on an FS.
|
||||
: S_WRITE 128 ; ! Write on file/directory/symlink.
|
||||
: S_APPEND 256 ; ! Append-only file.
|
||||
: S_IMMUTABLE 512 ; ! Immutable file.
|
||||
: MS_NOATIME 1024 ; ! Do not update access times.
|
||||
: MS_NODIRATIME 2048 ; ! Do not update directory access times.
|
||||
: MS_BIND 4096 ; ! Bind directory at different place.
|
||||
|
||||
FUNCTION: int mount
|
||||
( char* special_file, char* dir, char* fstype, ulong options, void* data ) ;
|
||||
|
|
|
@ -3,9 +3,9 @@ USING: alien.syntax ;
|
|||
|
||||
IN: unix.linux.swap
|
||||
|
||||
: SWAP_FLAG_PREFER HEX: 8000 ; ! Set if swap priority is specified.
|
||||
: SWAP_FLAG_PRIO_MASK HEX: 7fff ;
|
||||
: SWAP_FLAG_PRIO_SHIFT 0 ;
|
||||
: SWAP_FLAG_PREFER HEX: 8000 ; ! Set if swap priority is specified.
|
||||
: SWAP_FLAG_PRIO_MASK HEX: 7fff ;
|
||||
: SWAP_FLAG_PRIO_SHIFT 0 ;
|
||||
|
||||
FUNCTION: int swapon ( char* path, int flags ) ;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ article default-mapping set-mapping
|
|||
tag default-mapping set-mapping
|
||||
|
||||
: db ( -- object )
|
||||
{ f } ;
|
||||
{ f } ;
|
||||
|
||||
: set-db ( value -- )
|
||||
0 db set-nth ;
|
||||
|
|
|
@ -111,7 +111,7 @@ TUPLE: item quot expire? request id time-added ;
|
|||
expire-callbacks
|
||||
"id" query-param callback-table at [
|
||||
[
|
||||
dup item-request [
|
||||
dup item-request [
|
||||
<request> update-request
|
||||
] when*
|
||||
item-quot call
|
||||
|
|
|
@ -2,7 +2,7 @@ USING: sequences rss arrays concurrency kernel sorting
|
|||
html.elements io assocs namespaces math threads vocabs html
|
||||
furnace http.server.templating calendar math.parser splitting
|
||||
continuations debugger system http.server.responders
|
||||
xml.writer ;
|
||||
xml.writer prettyprint ;
|
||||
IN: webapps.planet
|
||||
|
||||
: print-posting-summary ( posting -- )
|
||||
|
|
|
@ -484,19 +484,19 @@ FUNCTION: BOOL LookupPrivilegeValueW ( LPCTSTR lpSystemName,
|
|||
: TOKEN_ADJUST_DEFAULT HEX: 0080 ; inline
|
||||
: TOKEN_READ STANDARD_RIGHTS_READ TOKEN_QUERY bitor ;
|
||||
: TOKEN_WRITE STANDARD_RIGHTS_WRITE
|
||||
TOKEN_ADJUST_PRIVILEGES bitor
|
||||
TOKEN_ADJUST_GROUPS bitor
|
||||
TOKEN_ADJUST_DEFAULT bitor ; foldable
|
||||
TOKEN_ADJUST_PRIVILEGES bitor
|
||||
TOKEN_ADJUST_GROUPS bitor
|
||||
TOKEN_ADJUST_DEFAULT bitor ; foldable
|
||||
: TOKEN_ALL_ACCESS STANDARD_RIGHTS_REQUIRED
|
||||
TOKEN_ASSIGN_PRIMARY bitor
|
||||
TOKEN_DUPLICATE bitor
|
||||
TOKEN_IMPERSONATE bitor
|
||||
TOKEN_QUERY bitor
|
||||
TOKEN_QUERY_SOURCE bitor
|
||||
TOKEN_ADJUST_PRIVILEGES bitor
|
||||
TOKEN_ADJUST_GROUPS bitor
|
||||
TOKEN_ADJUST_SESSIONID bitor
|
||||
TOKEN_ADJUST_DEFAULT bitor ; foldable
|
||||
TOKEN_ASSIGN_PRIMARY bitor
|
||||
TOKEN_DUPLICATE bitor
|
||||
TOKEN_IMPERSONATE bitor
|
||||
TOKEN_QUERY bitor
|
||||
TOKEN_QUERY_SOURCE bitor
|
||||
TOKEN_ADJUST_PRIVILEGES bitor
|
||||
TOKEN_ADJUST_GROUPS bitor
|
||||
TOKEN_ADJUST_SESSIONID bitor
|
||||
TOKEN_ADJUST_DEFAULT bitor ; foldable
|
||||
|
||||
FUNCTION: BOOL OpenProcessToken ( HANDLE ProcessHandle,
|
||||
DWORD DesiredAccess,
|
||||
|
|
|
@ -32,7 +32,7 @@ SYMBOL: <widget>
|
|||
{ [ dup UnmapNotify = ] [ drop <- handle-unmap ] }
|
||||
{ [ dup PropertyNotify = ] [ drop <- handle-property ] }
|
||||
{ [ t ] [ "handle-event :: ignoring event"
|
||||
print flush 3drop ] }
|
||||
print flush 3drop ] }
|
||||
} cond ]
|
||||
|
||||
} add-methods
|
|
@ -37,9 +37,9 @@ SYMBOL: <wm-frame-drag-move>
|
|||
[ <- draw-move-outline <- update-posn <- draw-move-outline <- loop ] }
|
||||
{ [ <- event-type ButtonRelease = ]
|
||||
[ <- draw-move-outline
|
||||
dup $frame <- position over <- drag-offset v+ >r
|
||||
dup $frame r> <-- move drop
|
||||
dup $frame <- raise drop drop ] }
|
||||
dup $frame <- position over <- drag-offset v+ >r
|
||||
dup $frame r> <-- move drop
|
||||
dup $frame <- raise drop drop ] }
|
||||
{ [ t ] [ <- loop ] } }
|
||||
cond ]
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ SYMBOL: <wm-frame-drag-size>
|
|||
[ <- draw-size-outline <- update-posn <- draw-size-outline <- loop ] }
|
||||
{ [ <- event-type ButtonRelease = ]
|
||||
[ <- draw-size-outline
|
||||
dup $frame over $posn pick $frame <- position v- <-- resize
|
||||
<- adjust-child drop ] }
|
||||
dup $frame over $posn pick $frame <- position v- <-- resize
|
||||
<- adjust-child drop ] }
|
||||
{ [ t ] [ <- loop ] } }
|
||||
cond ]
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ SYMBOL: WM_DELETE_WINDOW
|
|||
[ over XConfigureRequestEvent-height <-- set-child-height ] }
|
||||
{ [ t ]
|
||||
[ "<wm-frame> handle-configure-request :: resize not requested"
|
||||
print flush ] } }
|
||||
print flush ] } }
|
||||
cond
|
||||
2drop ]
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ dup XKeyEvent-state swap event>keyname 2array ;
|
|||
"handle-map-request" !( event wm-root -- ) [
|
||||
{ { [ over XMapRequestEvent-window managed? ]
|
||||
[ "<wm-root> handle-map-request :: window already managed" print flush
|
||||
2drop ] }
|
||||
2drop ] }
|
||||
{ [ t ] [ drop XMapRequestEvent-window <wm-frame> <<- create drop ] } }
|
||||
cond ]
|
||||
|
||||
|
@ -88,7 +88,7 @@ dup XKeyEvent-state swap event>keyname 2array ;
|
|||
{ [ over CWX? ] [ over XConfigureRequestEvent-x <-- set-x ] }
|
||||
{ [ over CWY? ] [ over XConfigureRequestEvent-y <-- set-y ] }
|
||||
{ [ t ] [ "<wm-root> handle-configure-request :: move not requested"
|
||||
print flush ] } }
|
||||
print flush ] } }
|
||||
cond
|
||||
|
||||
{ { [ over dup CWWidth? swap CWHeight? and ]
|
||||
|
@ -96,7 +96,7 @@ dup XKeyEvent-state swap event>keyname 2array ;
|
|||
{ [ over CWWidth? ] [ over XConfigureRequestEvent-width <-- set-width ] }
|
||||
{ [ over CWHeight? ] [ over XConfigureRequestEvent-height <-- set-height ] }
|
||||
{ [ t ] [ "<wm-root> handle-configure-request :: resize not requested"
|
||||
print flush ] } }
|
||||
print flush ] } }
|
||||
cond
|
||||
2drop ]
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ add-method
|
|||
[ 3dup dup <- top-left swap <- top-right <---- draw-line
|
||||
3dup dup <- top-right swap <- bottom-right <---- draw-line
|
||||
3dup dup <- bottom-left swap <- bottom-right <---- draw-line
|
||||
dup <- top-left swap <- bottom-left <---- draw-line ]
|
||||
dup <- top-left swap <- bottom-left <---- draw-line ]
|
||||
add-method
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
@ -449,8 +449,8 @@ USING: alien.syntax ;
|
|||
FUNCTION: KeyCode XKeysymToKeycode ( Display* display, KeySym keysym ) ;
|
||||
|
||||
FUNCTION: KeySym XKeycodeToKeysym ( Display* display,
|
||||
KeyCode keycode,
|
||||
int index ) ;
|
||||
KeyCode keycode,
|
||||
int index ) ;
|
||||
|
||||
FUNCTION: char* XKeysymToString ( KeySym keysym ) ;
|
||||
|
||||
|
|
|
@ -31,21 +31,21 @@ TYPEDEF: uchar KeyCode
|
|||
! modifier names. Used to build a SetModifierMapping request or
|
||||
! to read a GetModifierMapping request. These correspond to the
|
||||
! masks defined above.
|
||||
: ShiftMapIndex 0 ;
|
||||
: LockMapIndex 1 ;
|
||||
: ControlMapIndex 2 ;
|
||||
: Mod1MapIndex 3 ;
|
||||
: Mod2MapIndex 4 ;
|
||||
: Mod3MapIndex 5 ;
|
||||
: Mod4MapIndex 6 ;
|
||||
: Mod5MapIndex 7 ;
|
||||
: ShiftMapIndex 0 ;
|
||||
: LockMapIndex 1 ;
|
||||
: ControlMapIndex 2 ;
|
||||
: Mod1MapIndex 3 ;
|
||||
: Mod2MapIndex 4 ;
|
||||
: Mod3MapIndex 5 ;
|
||||
: Mod4MapIndex 6 ;
|
||||
: Mod5MapIndex 7 ;
|
||||
|
||||
|
||||
! button masks. Used in same manner as Key masks above. Not to be confused
|
||||
! with button names below.
|
||||
|
||||
|
||||
: AnyModifier 1 15 shift ; ! used in GrabButton, GrabKey
|
||||
: AnyModifier 1 15 shift ; ! used in GrabButton, GrabKey
|
||||
|
||||
! button names. Used as arguments to GrabButton and as detail in ButtonPress
|
||||
! and ButtonRelease events. Not to be confused with button masks above.
|
||||
|
@ -53,117 +53,117 @@ TYPEDEF: uchar KeyCode
|
|||
|
||||
! Notify modes
|
||||
|
||||
: NotifyNormal 0 ;
|
||||
: NotifyGrab 1 ;
|
||||
: NotifyUngrab 2 ;
|
||||
: NotifyWhileGrabbed 3 ;
|
||||
: NotifyNormal 0 ;
|
||||
: NotifyGrab 1 ;
|
||||
: NotifyUngrab 2 ;
|
||||
: NotifyWhileGrabbed 3 ;
|
||||
|
||||
: NotifyHint 1 ; ! for MotionNotify events
|
||||
|
||||
: NotifyHint 1 ; ! for MotionNotify events
|
||||
|
||||
! Notify detail
|
||||
|
||||
: NotifyAncestor 0 ;
|
||||
: NotifyVirtual 1 ;
|
||||
: NotifyInferior 2 ;
|
||||
: NotifyNonlinear 3 ;
|
||||
: NotifyAncestor 0 ;
|
||||
: NotifyVirtual 1 ;
|
||||
: NotifyInferior 2 ;
|
||||
: NotifyNonlinear 3 ;
|
||||
: NotifyNonlinearVirtual 4 ;
|
||||
: NotifyPointer 5 ;
|
||||
: NotifyPointerRoot 6 ;
|
||||
: NotifyDetailNone 7 ;
|
||||
: NotifyPointer 5 ;
|
||||
: NotifyPointerRoot 6 ;
|
||||
: NotifyDetailNone 7 ;
|
||||
|
||||
! Visibility notify
|
||||
|
||||
: VisibilityUnobscured 0 ;
|
||||
: VisibilityPartiallyObscured 1 ;
|
||||
: VisibilityFullyObscured 2 ;
|
||||
: VisibilityUnobscured 0 ;
|
||||
: VisibilityPartiallyObscured 1 ;
|
||||
: VisibilityFullyObscured 2 ;
|
||||
|
||||
! Circulation request
|
||||
|
||||
: PlaceOnTop 0 ;
|
||||
: PlaceOnBottom 1 ;
|
||||
: PlaceOnTop 0 ;
|
||||
: PlaceOnBottom 1 ;
|
||||
|
||||
! protocol families
|
||||
|
||||
: FamilyInternet 0 ; ! IPv4
|
||||
: FamilyDECnet 1 ;
|
||||
: FamilyChaos 2 ;
|
||||
: FamilyInternet6 6 ; ! IPv6
|
||||
: FamilyInternet 0 ; ! IPv4
|
||||
: FamilyDECnet 1 ;
|
||||
: FamilyChaos 2 ;
|
||||
: FamilyInternet6 6 ; ! IPv6
|
||||
|
||||
! authentication families not tied to a specific protocol
|
||||
: FamilyServerInterpreted 5 ;
|
||||
|
||||
! Property notification
|
||||
|
||||
: PropertyNewValue 0 ;
|
||||
: PropertyDelete 1 ;
|
||||
: PropertyNewValue 0 ;
|
||||
: PropertyDelete 1 ;
|
||||
|
||||
! Color Map notification
|
||||
|
||||
: ColormapUninstalled 0 ;
|
||||
: ColormapInstalled 1 ;
|
||||
: ColormapUninstalled 0 ;
|
||||
: ColormapInstalled 1 ;
|
||||
|
||||
! GrabPointer, GrabButton, GrabKeyboard, GrabKey Modes
|
||||
|
||||
: GrabModeSync 0 ;
|
||||
: GrabModeAsync 1 ;
|
||||
: GrabModeSync 0 ;
|
||||
: GrabModeAsync 1 ;
|
||||
|
||||
! GrabPointer, GrabKeyboard reply status
|
||||
|
||||
: GrabSuccess 0 ;
|
||||
: AlreadyGrabbed 1 ;
|
||||
: GrabInvalidTime 2 ;
|
||||
: GrabNotViewable 3 ;
|
||||
: GrabFrozen 4 ;
|
||||
: GrabSuccess 0 ;
|
||||
: AlreadyGrabbed 1 ;
|
||||
: GrabInvalidTime 2 ;
|
||||
: GrabNotViewable 3 ;
|
||||
: GrabFrozen 4 ;
|
||||
|
||||
! AllowEvents modes
|
||||
|
||||
: AsyncPointer 0 ;
|
||||
: SyncPointer 1 ;
|
||||
: ReplayPointer 2 ;
|
||||
: AsyncKeyboard 3 ;
|
||||
: SyncKeyboard 4 ;
|
||||
: ReplayKeyboard 5 ;
|
||||
: AsyncBoth 6 ;
|
||||
: SyncBoth 7 ;
|
||||
: AsyncPointer 0 ;
|
||||
: SyncPointer 1 ;
|
||||
: ReplayPointer 2 ;
|
||||
: AsyncKeyboard 3 ;
|
||||
: SyncKeyboard 4 ;
|
||||
: ReplayKeyboard 5 ;
|
||||
: AsyncBoth 6 ;
|
||||
: SyncBoth 7 ;
|
||||
|
||||
! Used in SetInputFocus, GetInputFocus
|
||||
|
||||
: RevertToNone None ;
|
||||
: RevertToPointerRoot PointerRoot ;
|
||||
: RevertToParent 2 ;
|
||||
: RevertToNone None ;
|
||||
: RevertToPointerRoot PointerRoot ;
|
||||
: RevertToParent 2 ;
|
||||
|
||||
! *****************************************************************
|
||||
! * ERROR CODES
|
||||
! *****************************************************************
|
||||
|
||||
: Success 0 ; ! everything's okay
|
||||
: BadRequest 1 ; ! bad request code
|
||||
: BadValue 2 ; ! int parameter out of range
|
||||
: BadWindow 3 ; ! parameter not a Window
|
||||
: BadPixmap 4 ; ! parameter not a Pixmap
|
||||
: BadAtom 5 ; ! parameter not an Atom
|
||||
: BadCursor 6 ; ! parameter not a Cursor
|
||||
: BadFont 7 ; ! parameter not a Font
|
||||
: BadMatch 8 ; ! parameter mismatch
|
||||
: BadDrawable 9 ; ! parameter not a Pixmap or Window
|
||||
: BadAccess 10 ; ! depending on context:
|
||||
! - key/button already grabbed
|
||||
! - attempt to free an illegal
|
||||
! cmap entry
|
||||
! - attempt to store into a read-only
|
||||
! color map entry.
|
||||
! - attempt to modify the access control
|
||||
! list from other than the local host.
|
||||
: BadAlloc 11 ; ! insufficient resources
|
||||
: BadColor 12 ; ! no such colormap
|
||||
: BadGC 13 ; ! parameter not a GC
|
||||
: BadIDChoice 14 ; ! choice not in range or already used
|
||||
: Success 0 ; ! everything's okay
|
||||
: BadRequest 1 ; ! bad request code
|
||||
: BadValue 2 ; ! int parameter out of range
|
||||
: BadWindow 3 ; ! parameter not a Window
|
||||
: BadPixmap 4 ; ! parameter not a Pixmap
|
||||
: BadAtom 5 ; ! parameter not an Atom
|
||||
: BadCursor 6 ; ! parameter not a Cursor
|
||||
: BadFont 7 ; ! parameter not a Font
|
||||
: BadMatch 8 ; ! parameter mismatch
|
||||
: BadDrawable 9 ; ! parameter not a Pixmap or Window
|
||||
: BadAccess 10 ; ! depending on context:
|
||||
! - key/button already grabbed
|
||||
! - attempt to free an illegal
|
||||
! cmap entry
|
||||
! - attempt to store into a read-only
|
||||
! color map entry.
|
||||
! - attempt to modify the access control
|
||||
! list from other than the local host.
|
||||
: BadAlloc 11 ; ! insufficient resources
|
||||
: BadColor 12 ; ! no such colormap
|
||||
: BadGC 13 ; ! parameter not a GC
|
||||
: BadIDChoice 14 ; ! choice not in range or already used
|
||||
: BadName 15 ; ! font or color name doesn't exist
|
||||
: BadLength 16 ; ! Request length incorrect
|
||||
: BadLength 16 ; ! Request length incorrect
|
||||
: BadImplementation 17 ; ! server is defective
|
||||
|
||||
: FirstExtensionError 128 ;
|
||||
: LastExtensionError 255 ;
|
||||
: FirstExtensionError 128 ;
|
||||
: LastExtensionError 255 ;
|
||||
|
||||
! *****************************************************************
|
||||
! * WINDOW DEFINITIONS
|
||||
|
@ -172,8 +172,8 @@ TYPEDEF: uchar KeyCode
|
|||
! Window classes used by CreateWindow
|
||||
! Note that CopyFromParent is already defined as 0 above
|
||||
|
||||
: InputOutput 1 ;
|
||||
: InputOnly 2 ;
|
||||
: InputOutput 1 ;
|
||||
: InputOnly 2 ;
|
||||
|
||||
! Used in CreateWindow for backing-store hint
|
||||
|
||||
|
@ -217,46 +217,46 @@ TYPEDEF: uchar KeyCode
|
|||
|
||||
! LineStyle
|
||||
|
||||
: LineSolid 0 ;
|
||||
: LineOnOffDash 1 ;
|
||||
: LineDoubleDash 2 ;
|
||||
: LineSolid 0 ;
|
||||
: LineOnOffDash 1 ;
|
||||
: LineDoubleDash 2 ;
|
||||
|
||||
! capStyle
|
||||
|
||||
: CapNotLast 0 ;
|
||||
: CapButt 1 ;
|
||||
: CapRound 2 ;
|
||||
: CapProjecting 3 ;
|
||||
: CapNotLast 0 ;
|
||||
: CapButt 1 ;
|
||||
: CapRound 2 ;
|
||||
: CapProjecting 3 ;
|
||||
|
||||
! joinStyle
|
||||
|
||||
: JoinMiter 0 ;
|
||||
: JoinRound 1 ;
|
||||
: JoinBevel 2 ;
|
||||
: JoinMiter 0 ;
|
||||
: JoinRound 1 ;
|
||||
: JoinBevel 2 ;
|
||||
|
||||
! fillStyle
|
||||
|
||||
: FillSolid 0 ;
|
||||
: FillTiled 1 ;
|
||||
: FillStippled 2 ;
|
||||
: FillOpaqueStippled 3 ;
|
||||
: FillSolid 0 ;
|
||||
: FillTiled 1 ;
|
||||
: FillStippled 2 ;
|
||||
: FillOpaqueStippled 3 ;
|
||||
|
||||
! fillRule
|
||||
|
||||
: EvenOddRule 0 ;
|
||||
: WindingRule 1 ;
|
||||
: EvenOddRule 0 ;
|
||||
: WindingRule 1 ;
|
||||
|
||||
! subwindow mode
|
||||
|
||||
: ClipByChildren 0 ;
|
||||
: IncludeInferiors 1 ;
|
||||
: ClipByChildren 0 ;
|
||||
: IncludeInferiors 1 ;
|
||||
|
||||
! SetClipRectangles ordering
|
||||
|
||||
: Unsorted 0 ;
|
||||
: YSorted 1 ;
|
||||
: YXSorted 2 ;
|
||||
: YXBanded 3 ;
|
||||
: Unsorted 0 ;
|
||||
: YSorted 1 ;
|
||||
: YXSorted 2 ;
|
||||
: YXBanded 3 ;
|
||||
|
||||
! CoordinateMode for drawing routines
|
||||
|
||||
|
@ -265,9 +265,9 @@ TYPEDEF: uchar KeyCode
|
|||
|
||||
! Polygon shapes
|
||||
|
||||
: Complex 0 ; ! paths may intersect
|
||||
: Nonconvex 1 ; ! no paths intersect, but not convex
|
||||
: Convex 2 ; ! wholly convex
|
||||
: Complex 0 ; ! paths may intersect
|
||||
: Nonconvex 1 ; ! no paths intersect, but not convex
|
||||
: Convex 2 ; ! wholly convex
|
||||
|
||||
! Arc modes for PolyFillArc
|
||||
|
||||
|
@ -280,10 +280,10 @@ TYPEDEF: uchar KeyCode
|
|||
|
||||
! used in QueryFont -- draw direction
|
||||
|
||||
: FontLeftToRight 0 ;
|
||||
: FontRightToLeft 1 ;
|
||||
: FontLeftToRight 0 ;
|
||||
: FontRightToLeft 1 ;
|
||||
|
||||
: FontChange 255 ;
|
||||
: FontChange 255 ;
|
||||
|
||||
! *****************************************************************
|
||||
! * IMAGING
|
||||
|
@ -291,9 +291,9 @@ TYPEDEF: uchar KeyCode
|
|||
|
||||
! ImageFormat -- PutImage, GetImage
|
||||
|
||||
: XYBitmap 0 ; ! depth 1, XYFormat
|
||||
: XYPixmap 1 ; ! depth == drawable depth
|
||||
: ZPixmap 2 ; ! depth == drawable depth
|
||||
: XYBitmap 0 ; ! depth 1, XYFormat
|
||||
: XYPixmap 1 ; ! depth == drawable depth
|
||||
: ZPixmap 2 ; ! depth == drawable depth
|
||||
|
||||
! *****************************************************************
|
||||
! * COLOR MAP STUFF
|
||||
|
@ -301,15 +301,15 @@ TYPEDEF: uchar KeyCode
|
|||
|
||||
! For CreateColormap
|
||||
|
||||
: AllocNone 0 ; ! create map with no entries
|
||||
: AllocAll 1 ; ! allocate entire map writeable
|
||||
: AllocNone 0 ; ! create map with no entries
|
||||
: AllocAll 1 ; ! allocate entire map writeable
|
||||
|
||||
|
||||
! Flags used in StoreNamedColor, StoreColors
|
||||
|
||||
: DoRed 1 0 shift ;
|
||||
: DoGreen 1 1 shift ;
|
||||
: DoBlue 1 2 shift ;
|
||||
: DoRed 1 0 shift ;
|
||||
: DoGreen 1 1 shift ;
|
||||
: DoBlue 1 2 shift ;
|
||||
|
||||
! *****************************************************************
|
||||
! * CURSOR STUFF
|
||||
|
@ -317,54 +317,54 @@ TYPEDEF: uchar KeyCode
|
|||
|
||||
! QueryBestSize Class
|
||||
|
||||
: CursorShape 0 ; ! largest size that can be displayed
|
||||
: TileShape 1 ; ! size tiled fastest
|
||||
: StippleShape 2 ; ! size stippled fastest
|
||||
: CursorShape 0 ; ! largest size that can be displayed
|
||||
: TileShape 1 ; ! size tiled fastest
|
||||
: StippleShape 2 ; ! size stippled fastest
|
||||
|
||||
! *****************************************************************
|
||||
! * KEYBOARD/POINTER STUFF
|
||||
! *****************************************************************
|
||||
|
||||
: AutoRepeatModeOff 0 ;
|
||||
: AutoRepeatModeOn 1 ;
|
||||
: AutoRepeatModeDefault 2 ;
|
||||
: AutoRepeatModeOff 0 ;
|
||||
: AutoRepeatModeOn 1 ;
|
||||
: AutoRepeatModeDefault 2 ;
|
||||
|
||||
: LedModeOff 0 ;
|
||||
: LedModeOn 1 ;
|
||||
: LedModeOff 0 ;
|
||||
: LedModeOn 1 ;
|
||||
|
||||
! masks for ChangeKeyboardControl
|
||||
|
||||
: KBKeyClickPercent 1 0 shift ;
|
||||
: KBBellPercent 1 1 shift ;
|
||||
: KBBellPitch 1 2 shift ;
|
||||
: KBBellDuration 1 3 shift ;
|
||||
: KBLed 1 4 shift ;
|
||||
: KBLedMode 1 5 shift ;
|
||||
: KBKey 1 6 shift ;
|
||||
: KBAutoRepeatMode 1 7 shift ;
|
||||
: KBKeyClickPercent 1 0 shift ;
|
||||
: KBBellPercent 1 1 shift ;
|
||||
: KBBellPitch 1 2 shift ;
|
||||
: KBBellDuration 1 3 shift ;
|
||||
: KBLed 1 4 shift ;
|
||||
: KBLedMode 1 5 shift ;
|
||||
: KBKey 1 6 shift ;
|
||||
: KBAutoRepeatMode 1 7 shift ;
|
||||
|
||||
: MappingSuccess 0 ;
|
||||
: MappingBusy 1 ;
|
||||
: MappingFailed 2 ;
|
||||
: MappingSuccess 0 ;
|
||||
: MappingBusy 1 ;
|
||||
: MappingFailed 2 ;
|
||||
|
||||
: MappingModifier 0 ;
|
||||
: MappingKeyboard 1 ;
|
||||
: MappingPointer 2 ;
|
||||
: MappingModifier 0 ;
|
||||
: MappingKeyboard 1 ;
|
||||
: MappingPointer 2 ;
|
||||
|
||||
! *****************************************************************
|
||||
! * SCREEN SAVER STUFF
|
||||
! *****************************************************************
|
||||
|
||||
: DontPreferBlanking 0 ;
|
||||
: PreferBlanking 1 ;
|
||||
: DefaultBlanking 2 ;
|
||||
: DontPreferBlanking 0 ;
|
||||
: PreferBlanking 1 ;
|
||||
: DefaultBlanking 2 ;
|
||||
|
||||
: DisableScreenSaver 0 ;
|
||||
: DisableScreenInterval 0 ;
|
||||
: DisableScreenSaver 0 ;
|
||||
: DisableScreenInterval 0 ;
|
||||
|
||||
: DontAllowExposures 0 ;
|
||||
: AllowExposures 1 ;
|
||||
: DefaultExposures 2 ;
|
||||
: DontAllowExposures 0 ;
|
||||
: AllowExposures 1 ;
|
||||
: DefaultExposures 2 ;
|
||||
|
||||
! for ForceScreenSaver
|
||||
|
||||
|
@ -377,28 +377,28 @@ TYPEDEF: uchar KeyCode
|
|||
|
||||
! for ChangeHosts
|
||||
|
||||
: HostInsert 0 ;
|
||||
: HostDelete 1 ;
|
||||
: HostInsert 0 ;
|
||||
: HostDelete 1 ;
|
||||
|
||||
! for ChangeAccessControl
|
||||
|
||||
: EnableAccess 1 ;
|
||||
: DisableAccess 0 ;
|
||||
: EnableAccess 1 ;
|
||||
: DisableAccess 0 ;
|
||||
|
||||
! Display classes used in opening the connection
|
||||
! Note that the statically allocated ones are even numbered and the
|
||||
! dynamically changeable ones are odd numbered
|
||||
|
||||
: StaticGray 0 ;
|
||||
: GrayScale 1 ;
|
||||
: StaticColor 2 ;
|
||||
: PseudoColor 3 ;
|
||||
: TrueColor 4 ;
|
||||
: DirectColor 5 ;
|
||||
: StaticGray 0 ;
|
||||
: GrayScale 1 ;
|
||||
: StaticColor 2 ;
|
||||
: PseudoColor 3 ;
|
||||
: TrueColor 4 ;
|
||||
: DirectColor 5 ;
|
||||
|
||||
|
||||
! Byte order used in imageByteOrder and bitmapBitOrder
|
||||
|
||||
: LSBFirst 0 ;
|
||||
: MSBFirst 1 ;
|
||||
: LSBFirst 0 ;
|
||||
: MSBFirst 1 ;
|
||||
|
||||
|
|
|
@ -9,23 +9,23 @@ IN: x11.glx
|
|||
LIBRARY: glx
|
||||
|
||||
! Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib)
|
||||
: GLX_USE_GL 1 ; ! support GLX rendering
|
||||
: GLX_BUFFER_SIZE 2 ; ! depth of the color buffer
|
||||
: GLX_LEVEL 3 ; ! level in plane stacking
|
||||
: GLX_RGBA 4 ; ! true if RGBA mode
|
||||
: GLX_DOUBLEBUFFER 5 ; ! double buffering supported
|
||||
: GLX_STEREO 6 ; ! stereo buffering supported
|
||||
: GLX_AUX_BUFFERS 7 ; ! number of aux buffers
|
||||
: GLX_RED_SIZE 8 ; ! number of red component bits
|
||||
: GLX_GREEN_SIZE 9 ; ! number of green component bits
|
||||
: GLX_BLUE_SIZE 10 ; ! number of blue component bits
|
||||
: GLX_ALPHA_SIZE 11 ; ! number of alpha component bits
|
||||
: GLX_DEPTH_SIZE 12 ; ! number of depth bits
|
||||
: GLX_STENCIL_SIZE 13 ; ! number of stencil bits
|
||||
: GLX_ACCUM_RED_SIZE 14 ; ! number of red accum bits
|
||||
: GLX_ACCUM_GREEN_SIZE 15 ; ! number of green accum bits
|
||||
: GLX_ACCUM_BLUE_SIZE 16 ; ! number of blue accum bits
|
||||
: GLX_ACCUM_ALPHA_SIZE 17 ; ! number of alpha accum bits
|
||||
: GLX_USE_GL 1 ; ! support GLX rendering
|
||||
: GLX_BUFFER_SIZE 2 ; ! depth of the color buffer
|
||||
: GLX_LEVEL 3 ; ! level in plane stacking
|
||||
: GLX_RGBA 4 ; ! true if RGBA mode
|
||||
: GLX_DOUBLEBUFFER 5 ; ! double buffering supported
|
||||
: GLX_STEREO 6 ; ! stereo buffering supported
|
||||
: GLX_AUX_BUFFERS 7 ; ! number of aux buffers
|
||||
: GLX_RED_SIZE 8 ; ! number of red component bits
|
||||
: GLX_GREEN_SIZE 9 ; ! number of green component bits
|
||||
: GLX_BLUE_SIZE 10 ; ! number of blue component bits
|
||||
: GLX_ALPHA_SIZE 11 ; ! number of alpha component bits
|
||||
: GLX_DEPTH_SIZE 12 ; ! number of depth bits
|
||||
: GLX_STENCIL_SIZE 13 ; ! number of stencil bits
|
||||
: GLX_ACCUM_RED_SIZE 14 ; ! number of red accum bits
|
||||
: GLX_ACCUM_GREEN_SIZE 15 ; ! number of green accum bits
|
||||
: GLX_ACCUM_BLUE_SIZE 16 ; ! number of blue accum bits
|
||||
: GLX_ACCUM_ALPHA_SIZE 17 ; ! number of alpha accum bits
|
||||
|
||||
TYPEDEF: XID GLXContextID
|
||||
TYPEDEF: XID GLXPixmap
|
||||
|
|
|
@ -17,7 +17,7 @@ IN: x11.windows
|
|||
StructureNotifyMask bitor
|
||||
KeyPressMask bitor
|
||||
KeyReleaseMask bitor
|
||||
ButtonPressMask bitor
|
||||
ButtonPressMask bitor
|
||||
ButtonReleaseMask bitor
|
||||
PointerMotionMask bitor
|
||||
FocusChangeMask bitor
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue