X-Git-Url: https://git.decadent.org.uk/gitweb/?p=ion3-doc.git;a=blobdiff_plain;f=tricks.tex;fp=tricks.tex;h=3069d3caa6415083c75fce421c47db7a54d96805;hp=b99968834ead85469e99e92d3f064b9c99502a22;hb=f823a79b155ec231cde335f6aafeeb76d7c86800;hpb=957794e869a5f9d18bc6355d1317580a768114cf diff --git a/tricks.tex b/tricks.tex index b999688..3069d3c 100644 --- a/tricks.tex +++ b/tricks.tex @@ -86,12 +86,15 @@ region, use \fnref{WRegion.set_name}. It is possible to write more complex winprop selection routines than those described in section \ref{sec:winprops}. To match a particular winprop using whatever way you want to, just set the \var{match} -field of the winprop to a function that receives the client window -as its sole parameter, and that returns \code{true} if the winprop -matches, and \code{false} otherwise. - -The class, instance and role properties can be obtained with -\fnref{WClientWin.get_ident}, and the title with \fnref{WRegion.name}. +field of the winprop to a function that receives the as its parameters +the triple \var{(prop, cwin, id)}, where \var{prop} is the table for +the winprop itself, \code{cwin} is the client window object, +and \var{id} is the \fnref{WClientWin.get_ident} result. +The function should return \var{true} if the winprop matches, +and \code{false} otherwise. Note that the \var{match} function +is only called after matching against class/role/instance. + +The title of a client window can be obtained with \fnref{WRegion.name}. If you want to match against (almost) arbitrary window properties, have a look at the documentation for the following functions, and their standard Xlib counterparts: \fnref{ioncore.x_intern_atom}