Who's Online |
16 user(s) are online ( 12 user(s) are browsing Forums)
Members: 0
Guests: 16
more...
|
|
|
|
Docky example
|
Posted on: 2013/9/7 11:32
#1
|
Just popping in
|
Hi, Since the AmigaOS documentation wiki is referring to it, I recently uploaded the latest source code of winbar.docky on OS4depot. This can be helpful for such things as adding context menus, firing requests to AmiDock or other of the many still undocumented features of the API. One thing I forgot to tell on OS4depot is where to find prefsobjects_macro.h include file which is required: the file can be downloaded from OpenAmiga.org.
|
|
|
|
Re: fdtrans, 68k->ppc cross-call stubs generation
|
Posted on: 2013/3/31 20:46
#2
|
Just popping in
|
@kas1e
1. If I got it right, you're in the situation of legacy 68k code calling a native library through a 68k jump table and emulation traps. Native code is not aware of emulated A6 register, it only requires an interface pointer as first parameter (Self) so I don't see any problem.
I think you are mixing up with the glue code which wrap 68k library calls from native code.
2. This first line is used to retrieve a pointer to the libbase (which is not used directly by ppc code).
|
|
|
|
Re: I.... hate AmiDock...!
|
Posted on: 2013/2/9 15:20
#3
|
Just popping in
|
@alfkil
You are notified about the task/bit to signal through DOCKYSET_DockyAttention (I would store it in the library base for an easy access by the main program). When your program signals AmïDock, every docky is sent the DOCKYGET_NeedsAttention message, so it is a good idea to use a flag to know if the notification really comes from your program.
@trixie
Given how it works, AmiDock is not meant for Intuition gadgets at all, but for animated contents.
|
|
|
|
Re: I.... hate AmiDock...!
|
Posted on: 2013/2/8 20:53
#4
|
Just popping in
|
@alfkil Quote: there is no way to trigger a redraw from outside the docky
Use DOCKYGET_NeedsAttention for this. This is how a docky can be notified from an external task by signaling AmiDock process. Quite straightforward, this is how e.g. winbar is told to rethink its layout in response to a change in preferences, or Intuition windows list. A shared structure and a semaphore/mutex to protect the data. IMHO the docky API is not too bad, the problem is the documentation was never finished.
|
|
|
|
Re: How to use Alpha layer for Docky ?
|
Posted on: 2013/2/6 20:42
#5
|
Just popping in
|
@zzd10h Quote: Edit : Is somebody knows if it's possible to add a Docky to AmiUpdate ? Because, unlike a normal application, APPDIR:NetDock doesn't work. Thank you
Yes, define the following function (AFAIR this is the example provided on AmiUpdate website) : Quote: /********************************************************** ** ** The following function saves the variable name passed in ** 'varname' to the ENV(ARC) system so that the application ** can become AmiUpdate aware. ** **********************************************************/ static void SetAmiUpdateENVVariable(CONST_STRPTR varname, CONST_STRPTR progpath ) { /* AmiUpdate support code */ APTR oldwin = NULL; TEXT varpath[1024] = "AppPaths";
/* stop any "Insert volume..." type requesters */ oldwin = IDOS->SetProcWindow((APTR)-1); /* finally set the variable to the path the executable was run from don't forget to supply the variable name to suit your application */
IDOS->AddPart( varpath, varname, 1024); IDOS->SetVar( varpath, progpath, -1, GVF_GLOBAL_ONLY|GVF_SAVE_VAR );
/* turn requesters back on */ IDOS->SetProcWindow( oldwin );
}
and call it when AmiDock tells you about the location of the docky library (removing the file name) : Quote: case DOCKYSET_FileName: { char buffer[LARGE_BUFFER]; IUtility->Strlcpy(buffer, (STRPTR)msgData, LARGE_BUFFER); *(IDOS->FilePart(buffer)) = '\0'; SetAmiUpdateENVVariable("NetDock", buffer); break; }
Then you just need to tell AmiUpdate the name of the env var to check (here : NetDock)
|
|
|
|
Re: How to use Alpha layer for Docky ?
|
Posted on: 2013/2/2 19:00
#6
|
Just popping in
|
Hi,
On non-composited screens, AmiDock uses a "fake" transparency effect (i.e. the bitmap is filled with the contents of the window behind the dock), meaning that you can only add things over the background but you cannot render half or totally transparent contents without doing the blending at the same time (or you'll lose background information).
So if you want to support this configuration you need to follow this rule or provide an alternate rendering if you want to do fancy stuff when compositing is enabled.
Now, what you are trying to do should work on composited screens, but you have to tell AmiDock that you are using composited mode (see DOCKYGET_SupportsComposite and DOCKYGET_CompositeMode) so that it does not try to de-multiply the docky bitmap. Also I'm not sure you can use legacy pens to fill alpha channel, you're better off with direct ARGB painting (see SetRPAttrs() with RPTAG_APenColor).
|
|
|
|
Re: Docky example
|
Posted on: 2013/1/23 21:36
#7
|
Just popping in
|
@alfkil In case you wondered where that contextMenu pointer came from, I'v just added the missing declaration in the code sample above .
|
|
|
|
Re: Docky example
|
Posted on: 2013/1/14 19:46
#8
|
Just popping in
|
@alfkil Context menus are dynamically built in response to DOCKYGET_ContextMenu attribute :
BOOL DockyGet (struct DockyIFace *Self, uint32 msgType, uint32 *msgData)
{
switch (msgType)
{
/* ... */
case DOCKYGET_ContextMenu:
{
Object *contextMenu = (Object *)msgData;
Object *item1 = PopupMenuItemObject,
PMIA_Title, GetString(&li, LOCALE_ITEM_PREFS),
PMIA_ID, PMID_PREFS,
PopupMenuItemEnd;
Object *item2 = PopupMenuItemObject,
PMIA_Title, GetString(&li, LOCALE_ITEM_SAVEASDEFAULT),
PMIA_ID, PMID_SAVEASDEFAULT,
PopupMenuItemEnd;
Object *item3 = PopupMenuItemObject,
PMIA_Title, GetString(&li, LOCALE_ITEM_USEASDEFAULT),
PMIA_ID, PMID_USEASDEFAULT,
PopupMenuItemEnd;
if (item1 && item2 && item3)
{
IIntuition->IDoMethod(contextMenu, OM_ADDMEMBER, item1);
IIntuition->IDoMethod(contextMenu, OM_ADDMEMBER, item2);
IIntuition->IDoMethod(contextMenu, OM_ADDMEMBER, item3);
}
}
break;
/* ... */
}
Edited by centaurz on 2013/1/23 21:35:41
|
|
|
|
Re: DSI error at exit
|
Posted on: 2011/12/12 21:15
#9
|
Just popping in
|
@freddix
It looks like you are passing a NULL pointer to some function from minigl.library in DEDeleteImage() (the cause of the DSI is an access to 0x00000020). Now you have to find out why.
|
|
|
|
Re: DSI error at exit
|
Posted on: 2011/12/12 20:13
#10
|
Just popping in
|
@freddix
A crashlog could help. If the DSI is within your code at least you'll know the reason of the crash.
|
|
|
|
Re: Obtain mp3 info?
|
Posted on: 2011/12/5 21:42
#11
|
Just popping in
|
@Antique Maybe you should declare and open the library ? Quote: struct MpegaIFace IMpega = NULL; struct Library *MPEGABase = NULL;
/* ... */
MPEGABase = OpenLibrary("mpega.library", 0);
IMpega = (struct MpegaIFace *)GetInterface(MPEGABase, "main", 1, NULL);
Edit: Salass00 faster + fixed libbase name
|
|
|
|
Re: Interrupts across a PCI Bridge
|
Posted on: 2011/11/13 14:37
#12
|
Just popping in
|
Hi, I found this link which might be helpful, though probably covering some x86-specific rules. At the beginning of the article, there seems to be a mapping applicable to PCI boards with an integrated bridge.
|
|
|
|
Re: Frontmost pubscreen?
|
Posted on: 2011/8/7 22:44
#13
|
Just popping in
|
@Deniil You mean a straightforward and elegant way of accessing information . No need for weird accessor such as IIntuition->GiveMeFrontmostScreenPlease().
|
|
|
|
Re: Frontmost pubscreen?
|
Posted on: 2011/8/7 18:54
#14
|
Just popping in
|
IntuitionBase->FirstScreen (better lock IBase while you read it).
|
|
|
|
Re: Application Suggestion for willing Developer
|
Posted on: 2011/8/3 21:26
#15
|
Just popping in
|
@angelheart
Because there's already a drawer for this purpose, it's called S: (for Scripts). C: is for Commands. Why reinvent the wheel ?
|
|
|
|
Re: Get WB params without using main() ?
|
Posted on: 2011/7/4 23:29
#16
|
Just popping in
|
@jaokim
You won't catch a lot of WB programs by patching System().
|
|
|
|
Re: How to manually initialize a bitmap
|
Posted on: 2011/6/23 18:42
#17
|
Just popping in
|
@TSK Quote: Quote from Autodocs for SetRPAttrs() and RPTAG_APenColor: "The alpha part is currently ignored and should be set to 0xFF".
So it looks like no chance at the moment.
This part of the autodoc actually needs an update. Of course you can render into the alpha channel of an ARGB bitmap. What is written here only applies to bitmaps that are meant for display (a window, a screen, a backbuffer...).
|
|
|
|
Re: Utilities/Find
|
Posted on: 2011/5/23 23:10
#18
|
Just popping in
|
@djrikki
No, it's a feature introduced by SFS and supported by JXFS as well. FFS partitions don't have such a directory for example.
|
|
|
|
Re: Moving windows
|
Posted on: 2011/5/10 22:39
#19
|
Just popping in
|
@Antique
What do you mean by 'moving' ? Simple translation or resizing ?
|
|
|
|
Re: Sane native?
|
Posted on: 2011/5/8 23:27
#20
|
Just popping in
|
@Mrodfr So there's someone working on the port, that's fine .
|
|
|
|