Page 1 of 1

GadgetWindowID( Gadget )

Posted: Sat May 21, 2016 4:19 pm
by mestnyi
To get a window where the gadget.

Code: Select all

Procedure GadgetWindowID( Gadget )
    CompilerSelect #PB_Compiler_OS
      CompilerCase #PB_OS_Windows
        ProcedureReturn GetAncestor_( GadgetID( Gadget ), #GA_ROOT )
      CompilerCase #PB_OS_Linux
        ProcedureReturn gtk_widget_get_toplevel_( GadgetID( Gadget ))
      CompilerCase #PB_OS_MacOS ; TODO
    CompilerEndSelect
  EndProcedure
It would be nice to add for mac os. :wink: