about summary refs log tree commit diff stats
path: root/README
Commit message (Expand)AuthorAgeFilesLines
* updated READMEAnselm R. Garbe2006-07-171-2/+2
* added dev.c instead of kb.cAnselm R. Garbe2006-07-131-1/+1
* small changes to READMEAnselm R. Garbe2006-07-131-3/+3
* added logo+descriptionAnselm R. Garbe2006-07-131-13/+12
* removed unnecessary crapAnselm R. Garbe2006-07-131-4/+2
* added mouse-based resizalsAnselm R. Garbe2006-07-111-9/+1
* updated READMEAnselm R. Garbe2006-07-111-5/+15
* fixed several stuff (gridwm gets better and better)Anselm R. Garbe2006-07-111-0/+1
* initial importAnselm R. Garbe2006-07-101-0/+40
* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#
#
#            Nim's Runtime Library
#        (c) Copyright 2012 Dominik Picheta
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

{.deadCodeElim:on.}

# Get the platform-dependent flags.
# Structure describing an inotify event.
type
  InotifyEvent*{.pure, final, importc: "struct inotify_event",
                   header: "<sys/inotify.h>".} = object
    wd*{.importc: "wd".}: cint # Watch descriptor.
    mask*{.importc: "mask".}: uint32 # Watch mask.
    cookie*{.importc: "cookie".}: uint32 # Cookie to synchronize two events.
    len*{.importc: "len".}: uint32 # Length (including NULs) of name.
    name*{.importc: "name".}: char # Name.
{.deprecated: [Tinotify_event: InotifyEvent].}

# Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH.
const
  IN_ACCESS* = 0x00000001   # File was accessed.
  IN_MODIFY* = 0x00000002   # File was modified.
  IN_ATTRIB* = 0x00000004   # Metadata changed.
  IN_CLOSE_WRITE* = 0x00000008 # Writtable file was closed.
  IN_CLOSE_NOWRITE* = 0x00000010 # Unwrittable file closed.
  IN_CLOSE* = (IN_CLOSE_WRITE or IN_CLOSE_NOWRITE) # Close.
  IN_OPEN* = 0x00000020     # File was opened.
  IN_MOVED_FROM* = 0x00000040 # File was moved from X.
  IN_MOVED_TO* = 0x00000080 # File was moved to Y.
  IN_MOVE* = (IN_MOVED_FROM or IN_MOVED_TO) # Moves.
  IN_CREATE* = 0x00000100   # Subfile was created.
  IN_DELETE* = 0x00000200   # Subfile was deleted.
  IN_DELETE_SELF* = 0x00000400 # Self was deleted.
  IN_MOVE_SELF* = 0x00000800 # Self was moved.
# Events sent by the kernel.
const
  IN_UNMOUNT* = 0x00002000  # Backing fs was unmounted.
  IN_Q_OVERFLOW* = 0x00004000 # Event queued overflowed.
  IN_IGNORED* = 0x00008000  # File was ignored.
# Special flags.
const
  IN_ONLYDIR* = 0x01000000  # Only watch the path if it is a
                            #        directory.
  IN_DONT_FOLLOW* = 0x02000000 # Do not follow a sym link.
  IN_EXCL_UNLINK* = 0x04000000 # Exclude events on unlinked
                               #        objects.
  IN_MASK_ADD* = 0x20000000 # Add to the mask of an already
                            #        existing watch.
  IN_ISDIR* = 0x40000000    # Event occurred against dir.
  IN_ONESHOT* = 0x80000000  # Only send event once.
# All events which a program can wait on.
const
  IN_ALL_EVENTS* = (IN_ACCESS or IN_MODIFY or IN_ATTRIB or IN_CLOSE_WRITE or
      IN_CLOSE_NOWRITE or IN_OPEN or IN_MOVED_FROM or IN_MOVED_TO or
      IN_CREATE or IN_DELETE or IN_DELETE_SELF or IN_MOVE_SELF)
# Create and initialize inotify instance.
proc inotify_init*(): cint{.cdecl, importc: "inotify_init",
                            header: "<sys/inotify.h>".}
# Create and initialize inotify instance.
proc inotify_init1*(flags: cint): cint{.cdecl, importc: "inotify_init1",
    header: "<sys/inotify.h>".}
# Add watch of object NAME to inotify instance FD.  Notify about
#   events specified by MASK.
proc inotify_add_watch*(fd: cint; name: cstring; mask: uint32): cint{.
    cdecl, importc: "inotify_add_watch", header: "<sys/inotify.h>".}
# Remove the watch specified by WD from the inotify instance FD.
proc inotify_rm_watch*(fd: cint; wd: cint): cint{.cdecl,
    importc: "inotify_rm_watch", header: "<sys/inotify.h>".}