本文整理汇总了C++中PyMac_Error函数的典型用法代码示例。如果您正苦于以下问题:C++ PyMac_Error函数的具体用法?C++ PyMac_Error怎么用?C++ PyMac_Error使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PyMac_Error函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: SetMenuBarFromNib
static PyObject *IBNibRefObj_SetMenuBarFromNib(IBNibRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
CFStringRef inName;
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &inName))
return NULL;
_err = SetMenuBarFromNib(_self->ob_itself,
inName);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:15,代码来源:_IBCarbon.c
示例2: PyMac_PRECHECK
static PyObject *AE_AEObjectInit(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
#ifndef AEObjectInit
PyMac_PRECHECK(AEObjectInit);
#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = AEObjectInit();
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
开发者ID:AdminCNP,项目名称:appscript,代码行数:15,代码来源:_AEmodule.c
示例3: PyMac_PRECHECK
static PyObject *DragObj_DragPostScroll(DragObjObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
#ifndef DragPostScroll
PyMac_PRECHECK(DragPostScroll);
#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = DragPostScroll(_self->ob_itself);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:15,代码来源:_Dragmodule.c
示例4: PyMac_PRECHECK
static PyObject *Res_ResError(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
#ifndef ResError
PyMac_PRECHECK(ResError);
#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = ResError();
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
开发者ID:0xcc,项目名称:python-read,代码行数:15,代码来源:_Resmodule.c
示例5: SndDoImmediate
static PyObject *SndCh_SndDoImmediate(SndChannelObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
SndCommand cmd;
if (!PyArg_ParseTuple(_args, "O&",
SndCmd_Convert, &cmd))
return NULL;
_err = SndDoImmediate(_self->ob_itself,
&cmd);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:15,代码来源:_Sndmodule.c
示例6: newiciobject
static iciobject *
newiciobject(OSType creator)
{
iciobject *self;
OSStatus err;
self = PyObject_NEW(iciobject, &Icitype);
if (self == NULL)
return NULL;
if ((err=ICStart(&self->inst, creator)) != 0 ) {
(void)PyMac_Error(err);
PyObject_DEL(self);
return NULL;
}
return self;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:16,代码来源:icgluemodule.c
示例7: CreateNibReference
static PyObject *IBCarbon_CreateNibReference(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
CFStringRef inNibName;
IBNibRef outNibRef;
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &inNibName))
return NULL;
_err = CreateNibReference(inNibName,
&outNibRef);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
IBNibRefObj_New, outNibRef);
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:16,代码来源:_IBCarbon.c
示例8: LSCopyDisplayNameForURL
static PyObject *Launch_LSCopyDisplayNameForURL(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
CFURLRef inURL;
CFStringRef outDisplayName;
if (!PyArg_ParseTuple(_args, "O&",
CFURLRefObj_Convert, &inURL))
return NULL;
_err = LSCopyDisplayNameForURL(inURL,
&outDisplayName);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
CFStringRefObj_New, outDisplayName);
return _res;
}
开发者ID:0xcc,项目名称:python-read,代码行数:16,代码来源:_Launchmodule.c
示例9: PyMac_PRECHECK
static PyObject *Icn_NewIconSuite(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
IconSuiteRef theIconSuite;
#ifndef NewIconSuite
PyMac_PRECHECK(NewIconSuite);
#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = NewIconSuite(&theIconSuite);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
ResObj_New, theIconSuite);
return _res;
}
开发者ID:Oize,项目名称:pspstacklesspython,代码行数:16,代码来源:_Icnmodule.c
示例10: SPBBytesToMilliseconds
static PyObject *Snd_SPBBytesToMilliseconds(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
long inRefNum;
long byteCount;
if (!PyArg_ParseTuple(_args, "l",
&inRefNum))
return NULL;
_err = SPBBytesToMilliseconds(inRefNum,
&byteCount);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("l",
byteCount);
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:16,代码来源:_Sndmodule.c
示例11: GetCompressionName
static PyObject *Snd_GetCompressionName(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
OSType compressionType;
Str255 compressionName;
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetOSType, &compressionType))
return NULL;
_err = GetCompressionName(compressionType,
compressionName);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
PyMac_BuildStr255, compressionName);
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:16,代码来源:_Sndmodule.c
示例12: GetSoundHeaderOffset
static PyObject *Snd_GetSoundHeaderOffset(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
SndListHandle sndHandle;
long offset;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &sndHandle))
return NULL;
_err = GetSoundHeaderOffset(sndHandle,
&offset);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("l",
offset);
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:16,代码来源:_Sndmodule.c
示例13: SndManagerStatus
static PyObject *Snd_SndManagerStatus(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
short theLength;
SMStatus theStatus__out__;
if (!PyArg_ParseTuple(_args, "h",
&theLength))
return NULL;
_err = SndManagerStatus(theLength,
&theStatus__out__);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("s#",
(char *)&theStatus__out__, (int)sizeof(SMStatus));
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:16,代码来源:_Sndmodule.c
示例14: RemoveReceiveHandler
static PyObject *Drag_RemoveReceiveHandler(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
WindowPtr theWindow = NULL;
OSErr _err;
if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
return NULL;
_err = RemoveReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
开发者ID:JupiterSmalltalk,项目名称:openqwaq,代码行数:16,代码来源:_Dragmodule.c
示例15: PyMac_PRECHECK
static PyObject *AE_AEGetInteractionAllowed(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSErr _err;
AEInteractAllowed level;
#ifndef AEGetInteractionAllowed
PyMac_PRECHECK(AEGetInteractionAllowed);
#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = AEGetInteractionAllowed(&level);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("b",
level);
return _res;
}
开发者ID:AdminCNP,项目名称:appscript,代码行数:16,代码来源:_AEmodule.c
示例16: LSOpenCFURLRef
static PyObject *Launch_LSOpenCFURLRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
CFURLRef inURL;
CFURLRef outLaunchedURL;
if (!PyArg_ParseTuple(_args, "O&",
CFURLRefObj_Convert, &inURL))
return NULL;
_err = LSOpenCFURLRef(inURL,
&outLaunchedURL);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
CFURLRefObj_New, outLaunchedURL);
return _res;
}
开发者ID:0xcc,项目名称:python-read,代码行数:16,代码来源:_Launchmodule.c
示例17: LSOpenFSRef
static PyObject *Launch_LSOpenFSRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
FSRef inRef;
FSRef outLaunchedRef;
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetFSRef, &inRef))
return NULL;
_err = LSOpenFSRef(&inRef,
&outLaunchedRef);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
PyMac_BuildFSRef, &outLaunchedRef);
return _res;
}
开发者ID:0xcc,项目名称:python-read,代码行数:16,代码来源:_Launchmodule.c
示例18: LSCopyKindStringForRef
static PyObject *Launch_LSCopyKindStringForRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
FSRef inFSRef;
CFStringRef outKindString;
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetFSRef, &inFSRef))
return NULL;
_err = LSCopyKindStringForRef(&inFSRef,
&outKindString);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
CFStringRefObj_New, outKindString);
return _res;
}
开发者ID:0xcc,项目名称:python-read,代码行数:16,代码来源:_Launchmodule.c
示例19: LSSetExtensionHiddenForURL
static PyObject *Launch_LSSetExtensionHiddenForURL(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
CFURLRef inURL;
Boolean inHide;
if (!PyArg_ParseTuple(_args, "O&b",
CFURLRefObj_Convert, &inURL,
&inHide))
return NULL;
_err = LSSetExtensionHiddenForURL(inURL,
inHide);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
开发者ID:0xcc,项目名称:python-read,代码行数:17,代码来源:_Launchmodule.c
示例20: LSSetExtensionHiddenForRef
static PyObject *Launch_LSSetExtensionHiddenForRef(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
OSStatus _err;
FSRef inRef;
Boolean inHide;
if (!PyArg_ParseTuple(_args, "O&b",
PyMac_GetFSRef, &inRef,
&inHide))
return NULL;
_err = LSSetExtensionHiddenForRef(&inRef,
inHide);
if (_err != noErr) return PyMac_Error(_err);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
开发者ID:0xcc,项目名称:python-read,代码行数:17,代码来源:_Launchmodule.c
注:本文中的PyMac_Error函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论