2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1998-09-23 21:16:51 +04:00
|
|
|
#ifndef nsIForm_h___
|
|
|
|
#define nsIForm_h___
|
|
|
|
|
|
|
|
#include "nsISupports.h"
|
2002-03-24 02:13:20 +03:00
|
|
|
#include "nsAString.h"
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
|
1998-09-23 21:16:51 +04:00
|
|
|
class nsIFormControl;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
|
2010-10-01 03:55:11 +04:00
|
|
|
#define NS_FORM_METHOD_GET 0
|
|
|
|
#define NS_FORM_METHOD_POST 1
|
1998-09-23 21:16:51 +04:00
|
|
|
#define NS_FORM_ENCTYPE_URLENCODED 0
|
|
|
|
#define NS_FORM_ENCTYPE_MULTIPART 1
|
2002-07-12 03:32:13 +04:00
|
|
|
#define NS_FORM_ENCTYPE_TEXTPLAIN 2
|
1998-09-23 21:16:51 +04:00
|
|
|
|
2006-09-18 08:53:54 +04:00
|
|
|
// IID for the nsIForm interface
|
2013-04-04 11:03:12 +04:00
|
|
|
#define NS_IFORM_IID \
|
2018-11-30 13:46:48 +03:00
|
|
|
{ \
|
2013-04-04 11:03:12 +04:00
|
|
|
0x5e8464c8, 0x015d, 0x4cf9, { \
|
|
|
|
0x92, 0xc9, 0xa6, 0xb3, 0x30, 0x8f, 0x60, 0x9d \
|
|
|
|
} \
|
|
|
|
}
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
|
1999-10-07 04:35:04 +04:00
|
|
|
/**
|
2009-10-30 04:49:11 +03:00
|
|
|
* This interface provides some methods that can be used to access the
|
|
|
|
* guts of a form. It's being slowly phased out.
|
1999-10-07 04:35:04 +04:00
|
|
|
*/
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
|
|
|
|
class nsIForm : public nsISupports {
|
1998-09-23 21:16:51 +04:00
|
|
|
public:
|
2005-11-11 17:36:26 +03:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFORM_IID)
|
1998-09-23 21:16:51 +04:00
|
|
|
|
|
|
|
/**
|
2002-08-17 09:42:55 +04:00
|
|
|
* Get the element at a specified index position in form.elements
|
2002-03-07 23:53:40 +03:00
|
|
|
*
|
|
|
|
* @param aIndex the index
|
|
|
|
* @param aElement the element at that index
|
|
|
|
* @return NS_OK if there was an element at that position, -1 otherwise
|
|
|
|
*/
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD_(nsIFormControl*) GetElementAt(int32_t aIndex) const = 0;
|
1998-09-23 21:16:51 +04:00
|
|
|
|
|
|
|
/**
|
2002-08-17 09:42:55 +04:00
|
|
|
* Get the number of elements in form.elements
|
2002-03-07 23:53:40 +03:00
|
|
|
*
|
|
|
|
* @param aCount the number of elements
|
|
|
|
* @return NS_OK if there was an element at that position, -1 otherwise
|
|
|
|
*/
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD_(uint32_t) GetElementCount() const = 0;
|
1998-09-23 21:16:51 +04:00
|
|
|
|
2001-11-28 14:00:14 +03:00
|
|
|
/**
|
2002-08-17 09:42:55 +04:00
|
|
|
* Get the index of the given control within form.elements.
|
2002-07-21 03:09:24 +04:00
|
|
|
* @param aControl the control to find the index of
|
|
|
|
* @param aIndex the index [OUT]
|
2002-03-07 23:53:40 +03:00
|
|
|
*/
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD_(int32_t) IndexOfControl(nsIFormControl* aControl) = 0;
|
2002-08-17 09:42:55 +04:00
|
|
|
|
2006-08-16 07:20:19 +04:00
|
|
|
/**
|
|
|
|
* Get the default submit element. If there's no default submit element,
|
|
|
|
* return null.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD_(nsIFormControl*) GetDefaultSubmitElement() const = 0;
|
1998-09-23 21:16:51 +04:00
|
|
|
};
|
|
|
|
|
2005-11-11 17:36:26 +03:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsIForm, NS_IFORM_IID)
|
|
|
|
|
1998-09-23 21:16:51 +04:00
|
|
|
#endif /* nsIForm_h___ */
|