New to SUSE

Hello guy’s;

I just installed SUSE 42.2 Leap , and installed FreeBASIC 64 for Linux and Geany IDE.

I’m trying to port my FB Windows apps to FB Linux.

What libs do i use to get Windows API liknesses , create windows and controls and stuff…and where do i find the docs for the libs?

Also has anyone written a text to speech engine for Linux… I’d like to set up my system to speak when things happen in the OS instead of system sounds.

So you are want to compile some FreeBASIC progams you have written to run on Linux?

Binaries, documentation etc can be found here

I already have the FB docs. FB comes with some *.bi (basic include) files for GTK 1 2 3
Theres a program called FBfrog that will convert C headers to FB *.bi files.

So basically (with some fiddeling and fussing) i can call any Linux C lib from FB and use GCC to compile , with the command line ( -gen GCC )

I just wanted to know what everyone else uses to write GUI’s and where are the docs ?
I need , windows , edits , statics , labels , trackbars , spinners , images , file browsers…

Basically i want to know what’s the best API , that can do what Windows API does?

And i want to know if anyone has written a “Text To Speech” app for Linux?
So i can call it from a script , so it can tell me about things instead of the default “system sounds”.
Windows allows you to change the system sounds for different system things… (Theme) and i had my windows set up with Text To Speech → *.wav files to play TTS wave file on system sounds. (I’d like to set my Linux up the same way…) so it can say “opening the program” or “someone just logged in remotely” etc…

Based on this old susefreebasic tutorial and this more recent thread the following might be the basis of required packages perhaps…

ncurses-devel
ncurses-devel-32-bit
libX11-devel
libX11-devel-32bit
libXrender-devel
libXrender-devel-32bit
libXext-devel
libXext-devel-32bit
libXpm-devel
libXpm-devel-32-bit
glibc-devel
glibc-devel-32-bit

You’ll soon find out if anything else is required while compiling of course.

Some of these questions are probably best asked via the freebasic.net Linux forum.

So basically (with some fiddeling and fussing) i can call any Linux C lib from FB and use GCC to compile , with the command line ( -gen GCC )

I just wanted to know what everyone else uses to write GUI’s and where are the docs ?

[QUOTE] || In Linux the graphical user interface is not a part of the operating system. The graphical user interface found on most Linux desktops is provided by software called the X Window System, which defines a device independent way of dealing with screens, keyboards and pointer devices.
|—|
X Window defines a network protocol for communication, and any program that knows how to “speak” this protocol can use it. There is a C library called Xlib that makes it easier to use this protocol, so Xlib is kind of the native GUI API. Xlib is not the only way to access an X Window server; there is also XCB.
Toolkit libraries such as GTK+ (used by GNOME) and Qt (used by KDE), built on top of Xlib, are used because they are easier to program with. For example they give you a consistent look and feel across applications, make it easier to use drag-and-drop, provide components standard to a modern desktop environment, and so on.

|

The FB docs don’t have any portion of the docs dedicated to Linux , there’s a FB forum / Linux but not many people using Linux use FB, ( FB Linux forum just told me about IUP API )

So to port a Windows app to Linux , i’d have to use Xlib and then GTK or QT ,
I’ve been browsing and found theres also WX and TK and IUP ( portable user interface) , Audacity uses WX…

I heard that QT was from a company called Troll Tech , and they allow it to be used , for free Linux distro’s
If you use it commercially then you have to pay for it?

What API do i use if i want to sell a program ? Can you sell programs that use public license GPL , LGPL ?

And then the question no one has yet answered "Is there a TTS (Text To Speech) app available on Linux? (everyone seems to be avoiding this question.)

Here’s what i have currently as far as TTS (Text To Speech) goes, someone on the FB Windows forum wrote the code for Windows.
I got it from the FB forum / Tips&Tricks section…

I’d like to port it to Linux…
you just create a string and call Speak(string)

#include once “windows.bi”
#include once “win/winnt.bi”
#include once “win/objbase.bi”
#inclib “ole32”

Dim shared IID_ISpVoice As GUID => ( &H6c44df74, &H72b9, &H4992, {&Ha1, &Hec, &Hef, &H99, &H6e, &H04, &H22, &Hd4 })
Dim shared CLSID_SpVoice As GUID => ( &H96749377, &H3391, &H11d2, {&H9e, &He3, &H00, &Hc0, &H4f, &H79, &H73, &H96 })

Type ISpVoiceVtbl_ As ISpVoiceVtbl

Type ISpVoice
lpVtbl As ISpVoiceVtbl_ Ptr
End Type

#define SPF_DEFAULT 0

Type ISpVoiceVtbl
rem iunknown
QueryInterface As Function(Byval As ISpVoice Ptr, Byval As IID Ptr, Byval As Any Ptr) As HRESULT
AddRef As Function(Byval As ISpVoice Ptr) As ULONG
Release As Function(Byval As ISpVoice Ptr) As ULONG

rem stubs
SetNotifySink As Function() As HRESULT
SetNotifyWindowMessage As Function() As HRESULT
SetNotifyCallbackFunction As Function() As HRESULT
SetNotifyCallbackInterface As Function() As HRESULT
SetNotifyWin32Event As Function() As HRESULT
WaitForNotifyEvent As Function() As HRESULT
GetNotifyEventHandle As Function() As HRESULT
SetInterest As Function() As HRESULT
GetEvents As Function() As HRESULT
GetInfo As Function() As HRESULT
SetOutput As Function() As HRESULT
GetOutputObjectToken As Function() As HRESULT
GetOutputStream As Function() As HRESULT

rem done
Pause As Function(Byval As ISpVoice Ptr) As HRESULT
Resume As Function(Byval As ISpVoice Ptr) As HRESULT

rem stubs
SetVoice As Function() As HRESULT
GetVoice As Function() As HRESULT

rem done
Speak As Function(Byval As ISpVoice Ptr, Byval pwcs As Wstring Ptr, Byval dwFlags As DWORD, Byval pulStreamNumber As ULONG Ptr) As HRESULT

rem stubs
SpeakStream As Function() As HRESULT
GetStatus As Function() As HRESULT
Skip As Function() As HRESULT
SetPriority As Function() As HRESULT
GetPriority As Function() As HRESULT
SetAlertBoundary As Function() As HRESULT
GetAlertBoundary As Function() As HRESULT

rem done
SetRate As Function(Byval As ISpVoice Ptr, Byval RateAdjust As Integer) As HRESULT
GetRate As Function(Byval As ISpVoice Ptr, Byval RateAdjust As Integer Ptr) As HRESULT
SetVolume As Function(Byval As ISpVoice Ptr, Byval usVolume As Ushort) As HRESULT
GetVolume As Function(Byval As ISpVoice Ptr, Byval pusVolume As Ushort Ptr) As HRESULT
WaitUntilDone As Function(Byval As ISpVoice Ptr, Byval msTimeout As ULONG) As HRESULT

rem stubs
SetSyncSpeakTimeout As Function() As HRESULT
GetSyncSpeakTimeout As Function() As HRESULT
SpeakCompleteEvent As Function() As HRESULT
IsUISupported As Function() As HRESULT
DisplayUI As Function() As HRESULT
End Type

sub Speak ( byref tstring as string, byval rate as integer = 0 )
Dim voices As ISpVoice Ptr
CoInitialize(NULL)
CoCreateInstance(@CLSID_SpVoice, NULL, CLSCTX_ALL, @IID_ISpVoice, Cast (Any Ptr, @voices))
voices->lpVtbl->SetRate(voices, rate)
voices->lpVtbl->Speak(voices, tString, 1, NULL)
voices->lpVtbl->WaitUntilDone(voices, INFINITE)
voices->lpVtbl->Release(voices)
CoUninitialize()
end sub

sub Speak_No_Rate ( byval param as any ptr )
dim as zstring ptr tstring = Cast(zstring ptr, param)
? tstring

Dim voices As ISpVoice Ptr
    CoInitialize(NULL)
    CoCreateInstance(@CLSID_SpVoice, NULL, CLSCTX_ALL, @IID_ISpVoice, Cast (Any Ptr, @voices))
    voices->lpVtbl->SetRate(voices, -2)
    voices->lpVtbl->Speak(voices, *tString, SPF_DEFAULT, NULL)
    voices->lpVtbl->WaitUntilDone(voices, INFINITE)
    voices->lpVtbl->Release(voices)
    CoUninitialize()

end sub
'===============================================================================

Yep.

I heard that QT was from a company called Troll Tech , and they allow it to be used , for free Linux distro’s
If you use it commercially then you have to pay for it?

Yes, as far as I understand, but you can read the definitive here

What API do i use if i want to sell a program ? Can you sell programs that use public license GPL , LGPL ?

For GPL, read this
https://www.gnu.org/licenses/gpl-faq.en.html

And then the question no one has yet answered "Is there a TTS (Text To Speech) app available on Linux? (everyone seems to be avoiding this question.)

Well, perhaps those that could answer haven’t had time to read this yet. We’re all volunteers :wink:

A bit of googling you your part may be necessary here…

And then the question no one has yet answered "Is there a TTS (Text To Speech) app available on Linux? (everyone seems to be avoiding this question.)

Your thread title “New to SUSE” will not realy draw the attention of people that know more about “Text to Speach”.

Seeing the “New to SUSE” title, many people will murmur “Welcome, enjoy” and carry on with more interesting cases without even opening the thread. Others will will only be irritated “this is openSUSE, not SUSE”, but likewise will do nothing with the thread.

On 2017-03-31, Albert Redditt <Albert_Redditt@no-mx.forums.microfocus.com> wrote:
> And then the question no one has yet answered "Is there a TTS (Text To
> Speech) app available on Linux? (everyone seems to be avoiding this
> question.)

You mean something like pico2wave, espeak, or mbrola?

I use Lazarus http://www.lazarus-ide.org/

You can choose which widgetset to use (GTK, QT, Win32…)
Code is always the same. It uses the Free Pascal Compiler.

On 2017-03-31, Albert Redditt <Albert_Redditt@no-mx.forums.microfocus.com> wrote:
> I just wanted to know what everyone else uses to write GUI’s and where
> are the docs ?

I use Qt. But according to https://en.wikipedia.org/wiki/List_of_language_bindings_for_Qt_5 there are no Qt bindings for
FB. I suspect that’s more a problem for FB than for Qt.

On Fri, 31 Mar 2017 01:36:01 +0000, Albert Redditt wrote:

> And then the question no one has yet answered "Is there a TTS (Text To
> Speech) app available on Linux? (everyone seems to be avoiding this
> question.)

It’s generally not a good practice to include multiple questions in the
same post - you may want to ask this question in the applications forum
with a title that’s related to the question you’re asking (also as a
general rule of thumb, a title like “New to SUSE” isn’t going to get
people’s attention - a good subject should relate to the question you’re
asking).

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C