Hi,
I was thinking about the docks and appicons in wmaker, and probably we
should work in this code.
Now, the Dock and the Clip are WDock structs, but the icons attached to
the Clip or the Dock are WAppIcons. When we create the Dock/Clip we do
something like:
- Create the Dock (WDock struct)
- Create a WAppIcon with the Dock image (WAppIcon struct)
- Assign the Dock to the WAppIcon :-?!!
That makes some things difficult. For example, we have different
functions to create the Clip/Dock (wDockCreate()) or restore it (for
example wClipRestoreState()), but these functions returns different
structs (wDockCreate returns a WDock, wClipRestoreState a WAppIcon).
Other example, with the Dock. The Dock is something like:
1. struct WAppIcon->dock is the pointer for the struct WDock
2. struct WDock has an icon_array, with WAppIcons.
3. The first WAppIcon in the array ([0]), is the WAppIcon for the dock
Then, we have something like:
WDock->icon_array[0]->dock = WDock
Probably, the best option is assign a different WAppIcon struct for the
Dock/Clip icon, outside the icon_array. Something like:
WDock->icon_array for WAppIcons
WDock->icon for the WAppIcon for the dock/clip.
But, anyway, I think return WAppIcon when we are trying to create a
WDock struct is wrong and all functions about Dock/Clip should work with
WDock structs.
Comments?
Cheers,
kix
--
To unsubscribe, send mail to [email protected].