Hello,
Hope you the best.
Can someone try to open a console in an already opened window ?
This is documented in SDK autodocs con-handler file entry.
I m doing :
Newshell WINDOW "CON://///WINDOW 0x502c34ab"
The hex at the end is the address of an (another) already open window.
Is this correct ? I try under AOSFEu0 without success.
Best regards,
DGILLES
Window option followed by address : how it works ?
Re: Window option followed by address : how it works ?
I think the documentation is a little bit confusing there.
The "WINDOW" argument is actually referring to the "CON:////" argument. There is no argument that actually SAYS window. There is a SCREEN argument that takes a screen address, though.
The "WINDOW" argument is actually referring to the "CON:////" argument. There is no argument that actually SAYS window. There is a SCREEN argument that takes a screen address, though.
Re: Window option followed by address : how it works ?
The documentation (in the SDK for con-handler) is clear.
I try and try without success…
Can someone try this feature ?
Regards
DGILLES
Re: Window option followed by address : how it works ?
Some tools:
Twin.c:
- - - - - -
Mwin.c:
- - -
Regards
DGILLES
Twin.c:
Code: Select all
#include <proto/exec.h>
#include <proto/graphics.h>
#include <proto/intuition.h>
struct Library *SysBase; /* EXEC library base */
struct ExecIFace *IExec;
struct Library *GraphicsBase;
struct GraphicsIFace *IGraphics;
int main() {
SysBase = *(struct Library **)4;
IExec = (struct ExecIFace *)((struct ExecBase *)SysBase)->MainInterface;
GraphicsBase = IExec->OpenLibrary("graphics.library", 0L);
IGraphics = (struct GraphicsIFace *)
IExec->GetInterface(GraphicsBase, "main", 1, NULL);
struct Window * win = (struct Window *)0x5c05c170;
IGraphics->Move(win->RPort, 100, 100);
IGraphics->Text(win->RPort, "ABC", 3);
}
Mwin.c:
Code: Select all
#include <stdio.h>
#include <proto/exec.h>
#include <proto/graphics.h>
#include <proto/intuition.h>
struct Library *SysBase; /* EXEC library base */
struct ExecIFace *IExec;
struct Library *GraphicsBase;
struct GraphicsIFace *IGraphics;
struct Library *IntuitionBase;
struct IntuitionIFace *IIntuition;
int main() {
SysBase = *(struct Library **)4;
IExec = (struct ExecIFace *)((struct ExecBase *)SysBase)->MainInterface;
struct Window * win = NULL;
GraphicsBase = IExec->OpenLibrary("graphics.library", 0L);
IGraphics = (struct GraphicsIFace *)
IExec->GetInterface(GraphicsBase, "main", 1, NULL);
IntuitionBase = IExec->OpenLibrary("intuition.library", 0L);
IIntuition = (struct IntuitionIFace *)
IExec->GetInterface(IntuitionBase, "main", 1, NULL);
win = IIntuition->OpenWindowTags(NULL,
// WA_PubScreen, my_screen,
// WA_RMBTrap, TRUE,
// WA_NoCareRefresh, TRUE, Mettre SMART_REFRESH avec pour éviter un bug avec la < 40.1
WA_Flags, /*WFLG_BACKDROP|WFLG_BORDERLESS|*/WFLG_ACTIVATE, // virer borderless pour regler la position de la fenetre
// WA_IDCMP, IDCMP_VANILLAKEY|IDCMP_RAWKEY,
WA_Top, 100,
// WA_Left, 0,
WA_Height, 200,
// WA_Width, 3 * my_tf->tf_XSize,
// WA_Width, 19 * my_tf->tf_XSize,
//WA_CustomScreen, my_screen,
TAG_END);
printf("%lx\n", (long)win);
// struct Window * win = (struct Window *)0x5c05c170;
// IGraphics->Move(win->RPort, 100, 100);
// IGraphics->Text(win->RPort, "ABC", 3);
}
Regards
DGILLES
- tonyw
- AmigaOS Core Developer
- Posts: 1479
- Joined: Wed Mar 09, 2011 1:36 pm
- Location: Sydney, Australia
Re: Window option followed by address : how it works ?
I answered your question in viewtopic.php?f=27&t=4718
cheers
tony
tony