Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
0437e890
Kaydet (Commit)
0437e890
authored
Şub 21, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix bug in filterproc interface
üst
f74c36c9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
38 deletions
+28
-38
tdlg.py
Mac/Lib/test/tdlg.py
+25
-10
Dlgmodule.c
Mac/Modules/dlg/Dlgmodule.c
+1
-1
dlggen.py
Mac/Modules/dlg/dlggen.py
+1
-26
dlgsupport.py
Mac/Modules/dlg/dlgsupport.py
+1
-1
No files found.
Mac/Lib/test/tdlg.py
Dosyayı görüntüle @
0437e890
# This program requires that a DLOG resource with ID=128 exists.
# You can make one with ResEdit if necessary.
# Function to display a message and wait for the user to hit OK.
# This uses a DLOG resource with ID=256 which is part of the standard
# Python library.
# The ID can be overridden by passing a second parameter.
from
Res
import
*
from
Dlg
import
*
from
Events
import
*
import
string
ires
=
128
ID
=
256
def
filter
(
*
args
):
print
'filter:'
,
args
def
f
(
d
,
event
):
what
,
message
,
when
,
where
,
modifiers
=
event
if
what
==
keyDown
and
modifiers
&
cmdKey
and
\
string
.
lower
(
chr
(
message
&
charCodeMask
))
==
'o'
:
return
1
d
=
GetNewDialog
(
ires
,
-
1
)
while
1
:
n
=
ModalDialog
(
filter
)
print
'item:'
,
n
if
n
==
1
:
break
def
message
(
str
=
"Hello, world!"
,
id
=
ID
):
d
=
GetNewDialog
(
id
,
-
1
)
tp
,
h
,
rect
=
d
.
GetDItem
(
2
)
SetIText
(
h
,
str
)
while
1
:
n
=
ModalDialog
(
f
)
if
n
==
1
:
break
def
test
():
message
()
if
__name__
==
'__main__'
:
test
()
Mac/Modules/dlg/Dlgmodule.c
Dosyayı görüntüle @
0437e890
...
...
@@ -55,7 +55,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
if
(
callback
==
NULL
)
return
0
;
/* Default behavior */
Dlg_FilterProc_callback
=
NULL
;
/* We'll restore it when call successful */
args
=
Py_BuildValue
(
"O&
s#"
,
DlgObj_New
,
dialog
,
event
,
(
int
)
sizeof
(
EventRecord
)
);
args
=
Py_BuildValue
(
"O&
O&"
,
WinObj_WhichWindow
,
dialog
,
PyMac_BuildEventRecord
,
event
);
if
(
args
==
NULL
)
res
=
NULL
;
else
{
...
...
Mac/Modules/dlg/dlggen.py
Dosyayı görüntüle @
0437e890
...
...
@@ -20,16 +20,6 @@ f = Function(DialogPtr, 'GetNewDialog',
)
functions
.
append
(
f
)
f
=
Function
(
void
,
'CouldDialog'
,
(
short
,
'dialogID'
,
InMode
),
)
functions
.
append
(
f
)
f
=
Function
(
void
,
'FreeDialog'
,
(
short
,
'dialogID'
,
InMode
),
)
functions
.
append
(
f
)
f
=
Function
(
void
,
'ParamText'
,
(
ConstStr255Param
,
'param0'
,
InMode
),
(
ConstStr255Param
,
'param1'
,
InMode
),
...
...
@@ -61,12 +51,6 @@ f = Method(void, 'DrawDialog',
)
methods
.
append
(
f
)
f
=
Method
(
void
,
'UpdtDialog'
,
(
DialogPtr
,
'theDialog'
,
InMode
),
(
RgnHandle
,
'updateRgn'
,
InMode
),
)
methods
.
append
(
f
)
f
=
Method
(
void
,
'UpdateDialog'
,
(
DialogPtr
,
'theDialog'
,
InMode
),
(
RgnHandle
,
'updateRgn'
,
InMode
),
...
...
@@ -97,16 +81,6 @@ f = Function(short, 'CautionAlert',
)
functions
.
append
(
f
)
f
=
Function
(
void
,
'CouldAlert'
,
(
short
,
'alertID'
,
InMode
),
)
functions
.
append
(
f
)
f
=
Function
(
void
,
'FreeAlert'
,
(
short
,
'alertID'
,
InMode
),
)
functions
.
append
(
f
)
f
=
Method
(
void
,
'GetDItem'
,
(
DialogPtr
,
'theDialog'
,
InMode
),
(
short
,
'itemNo'
,
InMode
),
...
...
@@ -222,3 +196,4 @@ f = Method(void, 'ShortenDITL',
(
short
,
'numberItems'
,
InMode
),
)
methods
.
append
(
f
)
Mac/Modules/dlg/dlgsupport.py
Dosyayı görüntüle @
0437e890
...
...
@@ -40,7 +40,7 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
if (callback == NULL)
return 0; /* Default behavior */
Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
args = Py_BuildValue("O&
s#", DlgObj_New, dialog, event, (int)sizeof(EventRecord)
);
args = Py_BuildValue("O&
O&", WinObj_WhichWindow, dialog, PyMac_BuildEventRecord, event
);
if (args == NULL)
res = NULL;
else {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment