You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
299 lines
8.2 KiB
299 lines
8.2 KiB
13 years ago
|
//
|
||
|
// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
|
||
|
// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
|
||
|
// may also apply
|
||
|
|
||
|
|
||
|
// Generated by preSip
|
||
12 years ago
|
// module tdehtml version KDE 3.5.3
|
||
13 years ago
|
|
||
|
|
||
|
// This software is free software; you can redistribute it and/or
|
||
|
// modify it under the terms of the GNU General Public License as
|
||
|
// published by the Free Software Foundation; either version 2 of
|
||
|
// the License, or (at your option) any later version.
|
||
|
//
|
||
|
// This software is distributed in the hope that it will be useful,
|
||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
// GNU General Public License for more details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public
|
||
|
// License along with this library; see the file COPYING.
|
||
|
// If not, write to the Free Software Foundation, Inc.,
|
||
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
|
||
|
|
||
|
class KHTMLSettings
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
12 years ago
|
#include <tdehtml_settings.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
enum KJavaScriptAdvice
|
||
|
{
|
||
|
KJavaScriptDunno,
|
||
|
KJavaScriptAccept,
|
||
|
KJavaScriptReject
|
||
|
};
|
||
|
|
||
|
|
||
|
enum KAnimationAdvice
|
||
|
{
|
||
|
KAnimationDisabled,
|
||
|
KAnimationLoopOnce,
|
||
|
KAnimationEnabled
|
||
|
};
|
||
|
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
|
|
||
|
enum KJSWindowOpenPolicy
|
||
|
{
|
||
|
KJSWindowOpenAllow,
|
||
|
KJSWindowOpenAsk,
|
||
|
KJSWindowOpenDeny,
|
||
|
KJSWindowOpenSmart
|
||
|
};
|
||
|
|
||
|
|
||
|
enum KJSWindowStatusPolicy
|
||
|
{
|
||
|
KJSWindowStatusAllow,
|
||
|
KJSWindowStatusIgnore
|
||
|
};
|
||
|
|
||
|
|
||
|
enum KJSWindowMovePolicy
|
||
|
{
|
||
|
KJSWindowMoveAllow,
|
||
|
KJSWindowMoveIgnore
|
||
|
};
|
||
|
|
||
|
|
||
|
enum KJSWindowResizePolicy
|
||
|
{
|
||
|
KJSWindowResizeAllow,
|
||
|
KJSWindowResizeIgnore
|
||
|
};
|
||
|
|
||
|
|
||
|
enum KJSWindowFocusPolicy
|
||
|
{
|
||
|
KJSWindowFocusAllow,
|
||
|
KJSWindowFocusIgnore
|
||
|
};
|
||
|
|
||
|
%End
|
||
|
|
||
|
KHTMLSettings ();
|
||
|
KHTMLSettings (const KHTMLSettings&);
|
||
|
void init ();
|
||
12 years ago
|
void init (TDEConfig*, bool = 1);
|
||
13 years ago
|
bool changeCursor ();
|
||
|
bool underlineLink ();
|
||
|
bool hoverLink ();
|
||
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
|
bool allowTabulation () const;
|
||
|
bool autoSpellCheck () const;
|
||
|
%End
|
||
|
|
||
|
KHTMLSettings::KAnimationAdvice showAnimations () const;
|
||
13 years ago
|
TQString stdFontName () const;
|
||
|
TQString fixedFontName () const;
|
||
|
TQString serifFontName () const;
|
||
|
TQString sansSerifFontName () const;
|
||
|
TQString cursiveFontName () const;
|
||
|
TQString fantasyFontName () const;
|
||
|
void setStdFontName (const TQString&);
|
||
|
void setFixedFontName (const TQString&);
|
||
13 years ago
|
int minFontSize () const;
|
||
|
int mediumFontSize () const;
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
|
bool jsErrorsEnabled () const;
|
||
|
void setJSErrorsEnabled (bool);
|
||
|
%End
|
||
|
|
||
13 years ago
|
const TQString& encoding () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
|
bool followSystemColors () const;
|
||
|
%End
|
||
|
|
||
13 years ago
|
const TQColor& textColor ();
|
||
13 years ago
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
13 years ago
|
const TQColor& baseColor () const;
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
const TQColor& linkColor ();
|
||
|
const TQColor& vLinkColor ();
|
||
13 years ago
|
bool autoLoadImages ();
|
||
|
|
||
|
%If ( KDE_3_4_0 - )
|
||
|
bool unfinishedImageFrame () const;
|
||
|
%End
|
||
|
|
||
|
|
||
|
%If ( KDE_3_3_0 - )
|
||
|
bool isOpenMiddleClickEnabled ();
|
||
|
%End
|
||
|
|
||
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
|
bool isBackRightClickEnabled ();
|
||
|
%End
|
||
|
|
||
13 years ago
|
bool isJavaEnabled (const TQString& = TQString ::null );
|
||
|
bool isJavaScriptEnabled (const TQString& = TQString ::null );
|
||
|
bool isJavaScriptDebugEnabled (const TQString& = TQString ::null );
|
||
13 years ago
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
13 years ago
|
bool isJavaScriptErrorReportingEnabled (const TQString& = TQString ::null ) const;
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
bool isPluginsEnabled (const TQString& = TQString ::null );
|
||
13 years ago
|
|
||
|
%If ( KDE_3_5_0 - )
|
||
13 years ago
|
bool isAdFiltered (const TQString&) const;
|
||
13 years ago
|
bool isAdFilterEnabled () const;
|
||
|
bool isHideAdsEnabled () const;
|
||
13 years ago
|
void addAdFilter (const TQString&);
|
||
13 years ago
|
bool accessKeysEnabled () const;
|
||
|
%End
|
||
|
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
13 years ago
|
KHTMLSettings::KJSWindowOpenPolicy windowOpenPolicy (const TQString& = TQString ::null ) const;
|
||
|
KHTMLSettings::KJSWindowMovePolicy windowMovePolicy (const TQString& = TQString ::null ) const;
|
||
|
KHTMLSettings::KJSWindowResizePolicy windowResizePolicy (const TQString& = TQString ::null ) const;
|
||
|
KHTMLSettings::KJSWindowStatusPolicy windowStatusPolicy (const TQString& = TQString ::null ) const;
|
||
|
KHTMLSettings::KJSWindowFocusPolicy windowFocusPolicy (const TQString& = TQString ::null ) const;
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
static KJavaScriptAdvice strToAdvice (const TQString&);
|
||
|
//ig static void splitDomainAdvice (const TQString&, TQString&, KHTMLSettings::KJavaScriptAdvice&, KHTMLSettings::KJavaScriptAdvice&);
|
||
13 years ago
|
static const char* adviceToStr (KHTMLSettings::KJavaScriptAdvice);
|
||
|
|
||
|
%If ( KDE_3_2_0 - )
|
||
12 years ago
|
//ig void readDomainSettings (TDEConfig*, bool, bool, KPerDomainSettings&);
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
TQString settingsToCSS () const;
|
||
|
static const TQString& availableFamilies ();
|
||
|
TQString userStyleSheet () const;
|
||
13 years ago
|
bool isFormCompletionEnabled () const;
|
||
|
int maxFormCompletionItems () const;
|
||
|
|
||
|
%If ( KDE_3_1_1 - )
|
||
|
bool isAutoDelayedActionsEnabled () const;
|
||
|
|
||
|
%If ( KDE_3_5_0 - )
|
||
13 years ago
|
TQValueList<TQPair<TQString,TQChar>> fallbackAccessKeysAssignments () const;
|
||
13 years ago
|
void setJSPopupBlockerPassivePopup (bool);
|
||
|
bool jsPopupBlockerPassivePopup () const;
|
||
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
|
}; // class KHTMLSettings
|
||
|
|
||
|
|
||
|
|
||
|
%If (KDE_3_5_0 - )
|
||
13 years ago
|
%MappedType TQValueList<TQPair<TQString,TQChar>>
|
||
|
//converts a Python list of tuples (TQString,TQChar)
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqvaluelist.h>
|
||
|
#include <tqstring.h>
|
||
12 years ago
|
#include <tdehtml_settings.h>
|
||
13 years ago
|
typedef TQPair<TQString,TQChar> AssignPair;
|
||
13 years ago
|
%End
|
||
|
|
||
|
%ConvertFromTypeCode
|
||
|
if (!sipCpp)
|
||
|
return PyList_New(0);
|
||
|
|
||
|
// Create the list
|
||
|
PyObject *pylist;
|
||
|
if ((pylist = PyList_New(0)) == NULL)
|
||
|
return NULL;
|
||
|
|
||
13 years ago
|
TQValueList<AssignPair> *cpplist = (TQValueList<AssignPair> *)sipCpp;
|
||
13 years ago
|
|
||
|
// Get it.
|
||
13 years ago
|
TQValueList<AssignPair>::Iterator it;
|
||
13 years ago
|
for( it = cpplist->begin(); it != cpplist->end(); ++it )
|
||
|
{
|
||
|
PyObject *inst = NULL;
|
||
13 years ago
|
TQString s = (*it).first;
|
||
|
TQChar c = (*it).second;
|
||
13 years ago
|
PyObject *pys = sipConvertFromNewType(new TQString(s), sipType_TQString, sipTransferObj);
|
||
|
PyObject *pyc = sipConvertFromNewType(new TQChar(c), sipType_TQChar, sipTransferObj);
|
||
13 years ago
|
if ((pys == NULL) || ((inst = Py_BuildValue ("NN", pys, pyc)) == NULL)
|
||
|
|| PyList_Append (pylist, inst) < 0)
|
||
|
{
|
||
|
Py_XDECREF (inst);
|
||
|
Py_XDECREF (pys);
|
||
|
Py_XDECREF (pyc);
|
||
|
Py_DECREF (pylist);
|
||
|
return NULL;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return pylist;
|
||
|
%End
|
||
|
|
||
|
|
||
|
%ConvertToTypeCode
|
||
|
if (sipIsErr == NULL)
|
||
|
return PyList_Check(sipPy);
|
||
|
|
||
13 years ago
|
TQValueList<AssignPair> *cpplist = new TQValueList<AssignPair>;
|
||
13 years ago
|
|
||
13 years ago
|
TQString *p1;
|
||
|
TQChar *p2;
|
||
13 years ago
|
int iserr = 0;
|
||
|
|
||
|
for (int i = 0; i < PyList_Size (sipPy); i++)
|
||
|
{
|
||
|
int p1_state, p2_state;
|
||
|
|
||
|
PyObject *elem = PyList_GET_ITEM (sipPy, i);
|
||
|
PyObject *pyp1 = PyTuple_GET_ITEM (elem, 0);
|
||
|
PyObject *pyp2 = PyTuple_GET_ITEM (elem, 1);
|
||
13 years ago
|
p1 = (TQString *)sipForceConvertToType(pyp1, sipType_TQString, sipTransferObj, SIP_NOT_NONE, &p1_state, &iserr);
|
||
|
p2 = (TQChar *)sipForceConvertToType(pyp2, sipType_TQChar, sipTransferObj, SIP_NOT_NONE, &p2_state, &iserr);
|
||
13 years ago
|
|
||
|
if (iserr)
|
||
|
{
|
||
|
if (p1)
|
||
13 years ago
|
sipReleaseType(p1, sipType_TQString, p1_state);
|
||
13 years ago
|
|
||
|
*sipIsErr = 1;
|
||
|
delete cpplist;
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
cpplist->append (AssignPair (*p1, *p2));
|
||
|
|
||
13 years ago
|
sipReleaseType(p1, sipType_TQString, p1_state);
|
||
|
sipReleaseType(p2, sipType_TQChar, p2_state);
|
||
13 years ago
|
}
|
||
|
|
||
|
*sipCppPtr = cpplist;
|
||
|
|
||
|
return 1;
|
||
|
%End
|
||
|
};
|
||
|
%End
|
||
|
|
||
|
|