Kann mir mal jeman sagen, wie die Winapi Konstanten #WM_COPY, #WM_PASTE bei Linux lauten ?
gtk_ ...... ?
win_api -> Linux
-
- Beiträge: 214
- Registriert: 30.03.2014 19:57
- Computerausstattung: Purebasic 5.70
- Wohnort: 18314 Löbnitz
win_api -> Linux
Purebasic 5.51
- ts-soft
- Beiträge: 22292
- Registriert: 08.09.2004 00:57
- Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel - Wohnort: Berlin
Re: win_api -> Linux
Die gibt es nicht, so einfach läßt sich die API nicht wechseln
Hier mal ein kleines Beispiel:
Hier wird "Hallo die Enten" ins EditorGadget gepasted.
Copy geht dann mit "copy-clipboard"

Hier mal ein kleines Beispiel:
Code: Alles auswählen
ImportC ""
g_signal_emit_by_name(*inst, name.p-utf8)
EndImport
OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 480, "")
EditorGadget(0, 10, 10, 620, 460)
SetClipboardText("Hallo die Enten")
g_signal_emit_by_name(GadgetID(0), "paste-clipboard")
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Copy geht dann mit "copy-clipboard"
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.

Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.

- ts-soft
- Beiträge: 22292
- Registriert: 08.09.2004 00:57
- Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel - Wohnort: Berlin
Re: win_api -> Linux
Hier nochmal der Crossplattform Ansatz, jedoch ohne MacOS:
Code: Alles auswählen
EnableExplicit
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
ImportC ""
g_signal_emit_by_name(*inst, name.p-utf8)
EndImport
CompilerEndIf
OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 480, "")
EditorGadget(0, 10, 10, 620, 460)
SetClipboardText("Hallo die Enten")
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
SendMessage_(GadgetID(0), #WM_PASTE, 0, 0)
CompilerCase #PB_OS_Linux
g_signal_emit_by_name(GadgetID(0), "paste-clipboard")
CompilerEndSelect
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.

Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.

-
- Beiträge: 214
- Registriert: 30.03.2014 19:57
- Computerausstattung: Purebasic 5.70
- Wohnort: 18314 Löbnitz