Back to index

lightning-sunbird  0.9+nobinonly
nsISVGGeometrySource.idl
Go to the documentation of this file.
00001 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is the Mozilla SVG project.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Crocodile Clips Ltd.
00019  * Portions created by the Initial Developer are Copyright (C) 2002
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Alex Fritze <alex@croczilla.com> (original author)
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either of the GNU General Public License Version 2 or later (the "GPL"),
00027  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 #include "nsISupports.idl"
00040 
00041 %{C++
00042 #include "nsColor.h"
00043 #include "nsIURI.h"
00044 %}
00045 
00046 native nscolor(nscolor);
00047 
00048 interface nsIDOMSVGMatrix;
00049 interface nsPresContext;
00050 interface nsIURI;
00051 interface nsISVGGradient;
00052 
00071 [uuid(b2c3119b-a27d-4b25-97a9-a9d60981a95e)]
00072 interface nsISVGGeometrySource : nsISupports
00073 {
00078   const unsigned long UPDATEMASK_NOTHING           = 0x00000000;
00079   const unsigned long UPDATEMASK_ALL               = 0xFFFFFFFF;
00086   readonly attribute nsPresContext presContext;
00087   const unsigned long UPDATEMASK_PRES_CONTEXT      = 0x00000001;
00094   readonly attribute nsIDOMSVGMatrix canvasTM;
00095   const unsigned long UPDATEMASK_CANVAS_TM               = 0x00000002;
00102   readonly attribute float strokeOpacity;
00103   const unsigned long UPDATEMASK_STROKE_OPACITY    = 0x00000004;
00110   readonly attribute float strokeWidth;
00111   const unsigned long UPDATEMASK_STROKE_WIDTH      = 0x00000008;
00118   void getStrokeDashArray([array, size_is(count)] out float arr,
00119                           out unsigned long count);
00120   const unsigned long UPDATEMASK_STROKE_DASH_ARRAY = 0x00000010;
00127   readonly attribute float strokeDashoffset;
00128   const unsigned long UPDATEMASK_STROKE_DASHOFFSET = 0x00000020;
00135   const unsigned short STROKE_LINECAP_BUTT   = 0;
00136   const unsigned short STROKE_LINECAP_ROUND  = 1;
00137   const unsigned short STROKE_LINECAP_SQUARE = 2;
00138 
00139   readonly attribute unsigned short strokeLinecap;
00140   const unsigned long UPDATEMASK_STROKE_LINECAP    = 0x00000040;
00148   const unsigned short STROKE_LINEJOIN_MITER = 0;
00149   const unsigned short STROKE_LINEJOIN_ROUND = 1;
00150   const unsigned short STROKE_LINEJOIN_BEVEL = 2;
00151 
00152   readonly attribute unsigned short strokeLinejoin;
00153   const unsigned long UPDATEMASK_STROKE_LINEJOIN   = 0x00000080;
00160   readonly attribute float strokeMiterlimit;
00161   const unsigned long UPDATEMASK_STROKE_MITERLIMIT = 0x00000100;
00168   readonly attribute float fillOpacity;
00169   const unsigned long UPDATEMASK_FILL_OPACITY      = 0x00000200;
00177   const unsigned short FILL_RULE_NONZERO = 0;
00178   const unsigned short FILL_RULE_EVENODD = 1;
00179   
00180   readonly attribute unsigned short fillRule;
00181   readonly attribute unsigned short clipRule;
00182   const unsigned long UPDATEMASK_FILL_RULE         = 0x00000400;
00190   const unsigned short PAINT_TYPE_NONE          = 0;
00191   const unsigned short PAINT_TYPE_SOLID_COLOR   = 1;
00192   const unsigned short PAINT_TYPE_SERVER        = 2; 
00193   const unsigned short PAINT_TYPE_GRADIENT      = 3; 
00194   const unsigned short PAINT_TYPE_PATTERN       = 4; 
00201   readonly attribute unsigned short strokePaintType; 
00202   const unsigned long UPDATEMASK_STROKE_PAINT_TYPE   = 0x00000800;
00203 
00204   /* strokePaintServerType will only be valid if strokePaintType ==
00205    * PAINT_TYPE_SERVER */
00206   readonly attribute unsigned short strokePaintServerType;
00207 
00208   /* strokePaint will only be valid if strokePaintType ==
00209    * PAINT_TYPE_SOLID_COLOR */
00210   readonly attribute nscolor strokePaint;
00211   
00212   /* GetStrokeGradient will only return a valid result if
00213    * strokePaintType == PAINT_TYPE_GRADIENT */
00214   void GetStrokeGradient(out nsISVGGradient aGrad);
00215   
00216   /* signifies that either paint color or server have changed,
00217    * depending on current strokePaintType */
00218   const unsigned long UPDATEMASK_STROKE_PAINT        = 0x00001000;
00219 
00226   readonly attribute unsigned short fillPaintType; 
00227   const unsigned long UPDATEMASK_FILL_PAINT_TYPE     = 0x00004000;
00228 
00229   /* fillPaintServerType will only be valid if fillPaintType ==
00230    * PAINT_TYPE_SERVER */
00231   readonly attribute unsigned short fillPaintServerType; 
00232 
00233   /* fillPaint will only be valid if fillPaintType ==
00234    * PAINT_TYPE_SOLID_COLOR */
00235   readonly attribute nscolor fillPaint;
00236   
00237   /* GetFillGradient will only return a valid result if
00238    * fillPaintType == PAINT_TYPE_GRADIENT */
00239   void GetFillGradient(out nsISVGGradient aGrad);
00240   
00241   /* signifies that either paint color or server have changed,
00242    * depending on current fillPaintType */
00243   const unsigned long UPDATEMASK_FILL_PAINT          = 0x00008000;
00244   
00247   boolean IsClipChild();
00248 };
00249