Página 1 de 1

Atualizações WVG na mira.

Enviado: 16 Nov 2020 18:31
por Itamar M. Lins Jr.
Olá!

Código: Selecionar todos

Support request #27: dialogs without main window (GTK/LINUX)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(and multithread support, with "gtwvg")
Programs:
- test/gtk_test/hexdump.prg
- test/Ticket27.prg
 
In the appended posted sample, i use a trick:
I created a main window, but don't activate it.
After all function calls i close the main windows
and the program terminates (a pointer to the object of the main window).
At the end of program the following message appeared:
(hexdump:4307): Gtk-CRITICAL **: 22:27:25.254: IA__gtk_main_quit: assertion 'main_loops != NULL' failed
==> Ignore this message.

Reference:
"Harbour for beginners", chapter "3.11 Multithreading".
( http://www.kresin.ru/en/hrbfaq.html )


Contents of "test.prg":
.......................
#include "hwgui.ch"

CLASS HWVG INHERIT HControl

   DATA winclass Init "HWVG"
   DATA nGT
   DATA hWnd
   METHOD New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, ;
      bInit, bSize, bPaint, bcolor, oStyle )
   METHOD onEvent()  INLINE { || Nil }
   METHOD Init()     INLINE { || Nil }
   METHOD Paint()    INLINE { || Nil }
   METHOD Release()  INLINE { || Nil }

ENDCLASS

METHOD New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, ;
      bInit, bSize, bPaint, bcolor, oStyle ) CLASS HPanel
   LOCAL oParent := iif( oWndParent == Nil, ::oDefaultParent, oWndParent )

   hb_gtReload( "WVG" )
   ::nGT  := hb_gtSelect() // hook events for keyboard/mouse/others
   ::hWnd := hb_gtInfo( HB_GTI_WINHANDLE )
   // set size
   // set parent

   RETURN Self



Contents of "test.prg" in archive "test.zip":
.............................................
Contens 
#include "wvgparts.ch"
#include "hbgtwvg.ch"
#include "wvtwin.ch"

ANNOUNCE HB_GTSYS
REQUEST HB_GT_WVG_DEFAULT

FUNCTION Main()

   LOCAL nCont

   FOR nCont = 1 TO 5
      hb_ThreadStart( { || Test() } )
   NEXT
   hb_ThreadWaitForAll()

   RETURN Nil

FUNCTION Test()

   LOCAL cTexto := Space(20), cTexto2 := Space(20), GetList := {}

   hb_gtReload( "WVG" )
   SetMode( 25, 80 )
   SetColor( "W/B" )
   CLS
   @ 12, 20 GET cTexto
   @ 14, 20 GET cTexto2
   READ

   RETURN Nil
Saudações,
Itamar M. Lins Jr.

Atualizações WVG na mira.

Enviado: 16 Nov 2020 19:28
por JoséQuintas
Tá parecendo uma das minhas tentativas..... rs

Tá colocando a janela WVG como outra janela qualquer, e criando os métodos dummy, assim a hwgui chama e não dá erro pela falta deles, mas eles não fazem nada.

Aonde achou esse fonte?

o ticket27 da hwgui é diferente desse.

Por falar nisso.... esqueci de enviar minhas descobertas pra lá...

Atualizações WVG na mira.

Enviado: 16 Nov 2020 20:20
por Itamar M. Lins Jr.
Olá!
Aonde achou esse fonte?
\test\ticket27.prg

Saudações,
Itamar M. Lins Jr.

Atualizações WVG na mira.

Enviado: 17 Nov 2020 15:52
por JoséQuintas
Baixei aqui e não veio isso.
Pode ser o começo de uma GTHWGUI....
Lembrando que não precisa ser GTWVG, pode ser a default Windows e a default Linux, WVT e GTK.

Atualizações WVG na mira.

Enviado: 17 Nov 2020 19:29
por JoséQuintas
Achei.

Isso está em doc/hwgui_dev.txt

São anotações gerais, pra ficarem agrupadas.

Atualizações WVG na mira.

Enviado: 21 Nov 2020 20:58
por JoséQuintas
Só pra ficar aqui também:

Enviei sobre a lista de diálogos ser por thread.
isso também resolveria, e é relativamente mais simples.