MCPcopy Create free account
hub / github.com/NetHack/NetHack / EditClipping

Function EditClipping

sys/amiga/winreq.c:346–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344}
345
346void
347EditClipping(void)
348{
349 int i;
350 long mflags;
351 static int sizes[] = { 8, 16, 20, 24, 28, 32, 36 };
352 char buf[40];
353 int done = 0, okay = 0;
354 long code, qual, class;
355 struct Gadget *gd, *dgad;
356 struct Window *nw;
357 struct IntuiMessage *imsg;
358 struct PropInfo *pip;
359 struct Screen *scrn;
360 long aidx;
361 int lmxsize = mxsize, lmysize = mysize;
362 int lxclipbord = xclipbord, lyclipbord = yclipbord;
363 int msx, msy;
364 int drag = 0;
365 static int once = 0;
366
367 scrn = HackScreen;
368
369 if (!once) {
370 SetBorder(&ClipOkay);
371 SetBorder(&ClipCancel);
372 once = 1;
373 }
374 ClipNewWindowStructure1.Screen = scrn;
375#ifdef INTUI_NEW_LOOK
376 if (IntuitionBase->LibNode.lib_Version >= 37) {
377 ((struct PropInfo *) ClipXSIZE.SpecialInfo)->Flags |= PROPNEWLOOK;
378 ((struct PropInfo *) ClipYSIZE.SpecialInfo)->Flags |= PROPNEWLOOK;
379 ((struct PropInfo *) ClipXCLIP.SpecialInfo)->Flags |= PROPNEWLOOK;
380 ((struct PropInfo *) ClipYCLIP.SpecialInfo)->Flags |= PROPNEWLOOK;
381 }
382#endif
383 if (WINVERS_AMIV || WINVERS_AMII) {
384#ifdef INTUI_NEW_LOOK
385 ClipNewWindowStructure1.Extension = wintags;
386 ClipNewWindowStructure1.Flags |= WFLG_NW_EXTENDED;
387 fillhook.h_Entry = (void *) &LayerFillHook;
388 fillhook.h_Data = (void *) -2;
389 fillhook.h_SubEntry = 0;
390#endif
391 }
392
393 nw = OpenWindow((void *) &ClipNewWindowStructure1);
394
395 if (nw == NULL) {
396 DisplayBeep(NULL);
397 return;
398 }
399
400 ShowClipValues(nw);
401 mflags = AUTOKNOB | FREEHORIZ;
402#ifdef INTUI_NEW_LOOK
403 if (IntuitionBase->LibNode.lib_Version >= 37) {

Callers 1

ifFunction · 0.85

Calls 5

SetBorderFunction · 0.85
ShowClipValuesFunction · 0.85
dispmap_sanityFunction · 0.85
doredrawFunction · 0.85
flush_glyph_bufferFunction · 0.85

Tested by

no test coverage detected