* * *

Author Topic: Cross-platform & language HBITMAP and SetParent analog  (Read 2603 times)

Человек_Борща

  • New member
  • *
  • Posts: 33
    • My little IT world.
Cross-platform & language HBITMAP and SetParent analog
« on: January 20, 2015, 12:30:48 pm »
Greetings!

I've writing pluginable application where plugin return's to me THandle of control which I put on some panel via WinAPI setParent(<for what>, <who's parent>) and image which returns as HBITMAP.

Any cross-platform analogs(interesting GTK2, GTK3 widget sets) for Linux?

With best regards, Alexandr.
_
OS: Windows 8.1 x64 / Ubuntu 14.02 x64
IDE: CodeTyphon 5.4 (win32-win64/win64) / FPC 3.1.1

Leledumbo

  • Hero Member
  • *****
  • Posts: 7742
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross-platform & language HBITMAP and SetParent analog
« Reply #1 on: January 20, 2015, 01:06:40 pm »
Use LCL handle (TControl / TWinControl) instead, it's cross widgetset already.

Человек_Борща

  • New member
  • *
  • Posts: 33
    • My little IT world.
Re: Cross-platform & language HBITMAP and SetParent analog
« Reply #2 on: January 20, 2015, 03:38:53 pm »
hm.. yep. But it broke all cross-language features. C++ programmer can't use TContol
With best regards, Alexandr.
_
OS: Windows 8.1 x64 / Ubuntu 14.02 x64
IDE: CodeTyphon 5.4 (win32-win64/win64) / FPC 3.1.1

Leledumbo

  • Hero Member
  • *****
  • Posts: 7742
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross-platform & language HBITMAP and SetParent analog
« Reply #3 on: January 20, 2015, 06:16:55 pm »
Choose one: cross widgetset or cross language, unless you want the C++ part to use LCL as well (feel free to complete LCL Bindings). If you choose cross language anyway, you will have to use damn ifdef for all widgetsets you want to use. Plus, not all backend uses multi-handle design, so a control doesn't always have a handle depending on the backend.

Crebase

  • Newbie
  • Posts: 2
Re: Cross-platform & language HBITMAP and SetParent analog
« Reply #4 on: March 16, 2015, 08:09:43 am »
Not be a problem any more.

zeljko

  • Hero Member
  • *****
  • Posts: 938
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Cross-platform & language HBITMAP and SetParent analog
« Reply #5 on: March 16, 2015, 10:45:36 am »
Gtk2 returns PGtkWidget (so that's original gtk2 lib handle).
Qt,gtk3,carbon,cocoa: returns TObject, eg. qt returns TQtWidget() and you can access qt lib handle with TQtWidget(Handle).Widget. Same applies for gtk3,carbon and cocoa.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus