Atualizações WVG na mira.

Projeto HwGui - Biblioteca visual para Harbour/xHarbour

Moderador: Moderadores

Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7928
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Atualizações WVG na mira.

Mensagem 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.
Saudações,
Itamar M. Lins Jr.
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

Atualizações WVG na mira.

Mensagem 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á...
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7928
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Atualizações WVG na mira.

Mensagem por Itamar M. Lins Jr. »

Olá!
Aonde achou esse fonte?
\test\ticket27.prg

Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

Atualizações WVG na mira.

Mensagem 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.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

Atualizações WVG na mira.

Mensagem por JoséQuintas »

Achei.

Isso está em doc/hwgui_dev.txt

São anotações gerais, pra ficarem agrupadas.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

Atualizações WVG na mira.

Mensagem 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.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Responder