Difference between revisions of "Carbon interface internals/de"
m |
m |
||
Line 31: | Line 31: | ||
* Tastatur Ereignisse (VK_ mapping für fremde Tastaturen muß noch getestet werden) | * Tastatur Ereignisse (VK_ mapping für fremde Tastaturen muß noch getestet werden) | ||
− | [[Image:Carbon interface show case.png| | + | [[Image:Carbon interface show case.png|500px|Working components in the Carbon interface]] |
== Was muß als nächstes getan werden ? == | == Was muß als nächstes getan werden ? == |
Revision as of 16:55, 24 April 2007
│ Deutsch (de) │ English (en) │
Dieser Artikel behandelt ausschließlich macOS.
Siehe auch: Multiplatform Programming Guide/de
Dieser Artikel behandelt ausschließlich iOS.
Siehe auch: Multiplatform Programming Guide/de
Diese Seite bietet einen Überblick über die LCL Carbon Schnittstelle für Mac OS X und soll neuen Entwicklern helfen.
Für die Installation und Erzeugung einer ersten Carbon Anwendung lesen sie zunächst Carbon Interface.
Dokumentation über Carbon
"Learning Carbon" sample book chapter
Free Pascal's Carbon API unit is FPCMacOSAll.pas in /usr/local/share/fpcsrc/packages/extra/univint.
Carbon interface development basics
- Target Mac OS X version is 10.4
- Avoid using obsolete or deprecated APIs and functions (e. g. QuickDraw vs. Quartz 2D)
- Use object approach
- Check Carbon calls result with OSError function
Was funktioniert bereits ?
- Formulare und Bedienelemente - siehe Roadmap Widgetset dependent components
- Erstellen von TOpenGLControl mit AGL Kontext (siehe components/opengl/)
- Maus Ereignisse
- Tastatur Ereignisse (VK_ mapping für fremde Tastaturen muß noch getestet werden)
Was muß als nächstes getan werden ?
Item | Anmerkung | Abhängigkeiten | Verantwortlich |
---|---|---|---|
TListBox + TCheckListBox | CreateListBoxControl does not function in compositing mode! We must create our own Carbon list box control. | ||
TBitBtn default glyphs | CreatePixmapIndirect | ||
TBrush Patterns | CGPatternCreate | ||
ScreenDC | CGDisplayCapture, CGDisplayGetDrawingContext - CGDisplayCapture locks screen! | TCarbonScreenContext | |
StretchMaskBlt | Implement: source coordinates, ROP, stretch mode | ||
TCalendar | no counterpart | ||
TFontDialog | FPShowHideFontPanel | ||
TListView | CreateDataBrowserControl | ||
TScrollBox, TCustomControl with scrollbars, TScrollingWinControl | HIScrollViewCreate | Tombo | |
TClipboard | PasteboardCreate |
Bugs
Item | Anmerkung | Abhängigkeiten | Verantwortlich |
---|---|---|---|
TCustomEdit.CharCase | Is ignored when typing text | ||
TMemo.WordWrap | persistent bug, when word wrap is disabled the memo doesn't scroll to caret | ||
TBitBtn.NumGlyphs | Crop glyph bitmap | Tombo | |
TMaskEdit | Every typed char is doubled |
Compatibility issues
Tastatur
- Apple Command key is mapped to ssCtrl due to Apple Guidelines
- Apple control key is mapped to ssMeta
- Apple option key is mapped to its inscription, i.e. ssAlt
- Virtual key codes mapping (depends on keyboard language layout!)
- Shortcuts indication (ampersand)
Drawing on canvas outside OnPaint event
- paints into QuickDraw window port, maybe QDBeginCGContext, QDEndCGContext would help
Note that Quickdraw is deprecated as of Mac OS X 10.5, so in the long term this needs another solution.
TControl.Color
- der Hintergrund von Carbon Bedienelementen ist transparent
Wie man ein neues Bedienelement hinzufügt
Zum Beispiel TButton.
TButton wird definiert in lcl/buttons.pp. Dies ist der plattformunabhängige Teil der LCL, welcher vom normalen LCL Programmierer benutzt wird.
Seine widgetset Klasse befindet sich in lcl/widgetset/wsbuttons.pp. Dies ist die plattformabhängige Basis für alle widgetsets (carbon, gtk, win32, ...).
Seine Carbon Schnittstellenklasse ist in lcl/interfaces/carbon/carbonwsbuttons.pp:
TCarbonWSButton = class(TWSButton) private protected public class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override; end;
Jede WS Klasse, die tatsächlich etwas implementiert, muß registriert werden. Schauen sie den initialization Abschnitt am Ende der carbonwsXXX.pp Unit an:
RegisterWSComponent(TCustomButton, TCarbonWSButton);
TCarbonWSButton setzt CreateHandle außer Kraft, to create a Carbon button helper class called TCarbonButton in carbonprivate.pp, which really creates the button control in the Carbon and installs event handlers.