Re: which language you would use for X11-less macOS graphic framework?

2024-05-04 Thread Alexei Podtelezhnikov
On Sat, May 4, 2024 at 10:19 AM Sean McBride  wrote:
> > Me too. We are talking about an API which opens a window and shows an 
> > uncompressed pixel buffer in whatever language.Then it passes on 
> > keystrokes, receives an updated pixel buffer, and updates the window with 
> > it.
>
> Is that what we're looking to do?  If so, you might also look at NSWindow and 
> NSView.
>
> Something else to consider: what is the oldest version of macOS you want to 
> support with this?

Perhaps, this is it. I think we need a few years back and as much as
reasonable forward. SetDIBitsToDevice of legacy GDI still works under
Windows 11.



Re: which language you would use for X11-less macOS graphic framework?

2024-05-04 Thread Sean McBride
On 2 May 2024, at 5:38, Hin-Tak Leung wrote:

> I think Just uses pyobjc (python binding to objective c), which is bunded on 
> mac os x's shipped Python.

macOS doesn't include python anymore BTW.


On 2 May 2024, at 10:37, Alexei Podtelezhnikov wrote:

> Me too. We are talking about an API which opens a window and shows an 
> uncompressed pixel buffer in whatever language.Then it passes on keystrokes, 
> receives an updated pixel buffer, and updates the window with it.

Is that what we're looking to do?  If so, you might also look at NSWindow and 
NSView.

Something else to consider: what is the oldest version of macOS you want to 
support with this?

Sean



Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Werner LEMBERG


>  You mean former (instead of latter), ftinspect already depends on Qt?

Yes, sorry.


Werner



Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Hin-Tak Leung
 You mean former (instead of latter), ftinspect already depends on Qt?
I think you may be looking something in the "AppKit" namespace, whichever 
language binding you use... for the widgets, windows and buttons.
On Thursday, 2 May 2024 at 16:17:02 BST, Werner LEMBERG  
wrote:  
 
 
> Again the goal is to remove dependencies like XQuartz and make it
> work without it.  Adding Qt or Py dependencies is not a solution. Or
> this a different project.

For the latter we already have `ftinspect`.


    Werner
  

Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Werner LEMBERG


> Again the goal is to remove dependencies like XQuartz and make it
> work without it.  Adding Qt or Py dependencies is not a solution. Or
> this a different project.

For the latter we already have `ftinspect`.


Werner



Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Hin-Tak Leung
 Quartz seems to have CGBitmapContextCreate/CGBitmapContextCreateImage ... just 
reading random bits of Just's python code.
On Thursday, 2 May 2024 at 15:57:47 BST, Alexei Podtelezhnikov 
 wrote:  
 
 Xlib uses XPutImage.
Windows uses SetDIBitsToDevice.
What does macOS use?
  

Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Alexei Podtelezhnikov
Xlib uses XPutImage.
Windows uses SetDIBitsToDevice.
What does macOS use?



Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Hin-Tak Leung
 Swift is a language and a runtime; python is also a language and a runtime... 
objective c is a compiled language, extended c. They all provide binding to the 
platform's GUI toolkit. (cocoa/quartz). Swift on Linux doesn't bind to cocoa 
(nor x11, I think - not familiar with it). If you are going to get rid of x11, 
it will be mac os -specific in some degree already.
One of Just's programs I have on my hard disk has `import AppKit` in it (that's 
cocoa), and another part has `import Quartz`. It is doing those for basic 
windows programming for mac os.
On Thursday, 2 May 2024 at 15:37:33 BST, Alexei Podtelezhnikov 
 wrote:  
 
 > Am I missing some points?

Me too. We are talking about an API which opens a window and shows an 
uncompressed pixel buffer in whatever language.Then it passes on keystrokes, 
receives an updated pixel buffer, and updates the window with it. 

We are talking about really basic window programming for macOS. The pixel 
buffer is already prepared in a system-independent fashion.  

Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Alexei Podtelezhnikov
Forgot to mention window resize events…

Again the goal is to remove dependencies like XQuartz and make it work without 
it. Adding Qt or Py dependencies is not a solution. Or this a different project.

> On May 2, 2024, at 10:37, Alexei Podtelezhnikov  wrote:
> 
> 
>> 
>> Am I missing some points?
> 
> Me too. We are talking about an API which opens a window and shows an 
> uncompressed pixel buffer in whatever language.Then it passes on keystrokes, 
> receives an updated pixel buffer, and updates the window with it.
> 
> We are talking about really basic window programming for macOS. The pixel 
> buffer is already prepared in a system-independent fashion.



Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Alexei Podtelezhnikov
> Am I missing some points?

Me too. We are talking about an API which opens a window and shows an 
uncompressed pixel buffer in whatever language.Then it passes on keystrokes, 
receives an updated pixel buffer, and updates the window with it. 

We are talking about really basic window programming for macOS. The pixel 
buffer is already prepared in a system-independent fashion.


Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread suzuki toshiya

Thank you very much for good introduction of PyObjC. Your comment "(Swift) is quite 
large" is about Swift on Linux? or both of macOS and Linux?

In my understanding, the basic idea of Ahmet's GSoC 2024 is a rewriting of 
freetype-demos/graph/mac to catch up with the latest macOS, not an introduction 
of new nice FreeType demo programs written in scripting language.

freetype-demos/graph is a source tree for an object file with portable frontend 
(to be called by C) and platform-dependent backend, like X11, Win32, OS2 and 
BeOS. It's hard for me to think about a C object file which can call PyObjC 
internally, although it might be possible.

If somebody wants to have a Python-based toolkit to develop new nice FreeType 
demo programs, it's good, but for such requirements, using softwares with 
platform dependencies like PyObjC, is not the best. PyGTK+ or PyQt might be 
better, I think. Am I missing some points?

Regards,
mpsuzuki

On 2024/05/02 18:38, Hin-Tak Leung wrote:

I think Swift runs on Linux also these days, but perhaps without any GUI 
bindings. I considered installing it at some point but it is quite large (even 
without GUI) binding. Size we are talking about similar to Rust and Java.

Open GL on Mac OS X is on the way out and quite buggy/behind mesa on Linux. 
You'll find accelerated graphics works on Linux but not on Mac OS X. (There are 
two existing bugs on skia-python specific to Mac OS X).

Metal is what Apple offers instead of Open GL. There is a feature request (I 
filed it to remind myself...) to switch on Metal support on Mac OS X for 
skia-python since Open GL is lacking.

Before you dive into Swift, considering watching some of Just van Rossum 's 
videos on YouTube for inspirations. Just is a font designer who also happens to 
be brother of Guido (inventor of Python). Just uses Mac OS as most graphics 
designer people do, and you would be amazed what you can do with Python 
GUI-wise on Mac OS, if your brother happens to be the most knowledgeable person 
about Python in the world :-) ... and check out Just's various software on 
github too after you check out the videos.

I think Just uses pyobjc (python binding to objective c), which is bunded on 
mac os x's shipped Python. But, have a look at what Just uses lately; he may 
have some swift stuff too. Anyway, he is Mac OS-based, and his software works 
are open-source and mostly about fonts, so you just find plenty to take 
inspiration on. (I don't think he subscribes to freetype-devel, but I could be 
wrong...)


On Thursday, 2 May 2024 at 09:59:52 BST, Ahmet Göksu  wrote:


Thank you for your guidance.

I agree with your assessment and prefer to use Swift. It seems well-suited for 
future-proofing our project.

Best,
Goksu
goksu.in
On May 2, 2024 at 11:17 +0300, suzuki toshiya , 
wrote:
Dear Ahmet,

The development of native GUI application for macOS have 3 choices:
1) Use C and Carbon framework (now obsoleted)
2) Objective-C and Cocoa framework
3) Swift

I think 2) or 3) are (still) reasonable options, but 1) is not anymore.
I'm unfamiliar with a market trend for Apple products, but sometimes
I hear a few people (working for iOS softwares) promoting Swift as
Swift is in, and Objective-C is out.

Also, there would be alternative approach, like Qt, to keep from playing
with Apple-specific technologies.

Do you have any preference?

Regards,
mpsuzuki

On 2024/05/02 14:30, Ahmet Göksu wrote:
Hi Suzuki,

Thank you, I am so excited to work with you!

The new goal is Native Graphics Backend for FreeType Demos on macOS.
I have updated on the GSoC website but the proposal file is unable to change.

Here you can find my proposal in the attachments.

Best,
Goksu
goksu.in
On May 2, 2024 at 03:56 +0300, suzuki toshiya , 
wrote:
Dear Ahmet,

Congratulation! I'm glad to find another macOS contributor in
FreeType.

Please could you provide the updated estimation of the schedule,
with new goal (native graphics backend for macOS, without X11)?
The filed schedule dated on April 2nd was written for older goal
(an improvement of ftbench and related).

Regards,
mpsuzuki

On 2024/05/02 4:31, Ahmet Göksu wrote:
Hello!
Its Ahmet Goksu, last years GSoC contributor on ftbench.
This year, I will be contributing development graphics backend natively on 
macOS without X11.

Its so exciting to be here again!

here are my infos to connect:

https://www.linkedin.com/in/ahmetgoksu/
https://github.com/goeksu
https://resume.goksu.in

Best,
Goksu
goksu.in









Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Hin-Tak Leung
 I think Swift runs on Linux also these days, but perhaps without any GUI 
bindings. I considered installing it at some point but it is quite large (even 
without GUI) binding. Size we are talking about similar to Rust and Java.
Open GL on Mac OS X is on the way out and quite buggy/behind mesa on Linux. 
You'll find accelerated graphics works on Linux but not on Mac OS X. (There are 
two existing bugs on skia-python specific to Mac OS X).
Metal is what Apple offers instead of Open GL. There is a feature request (I 
filed it to remind myself...) to switch on Metal support on Mac OS X for 
skia-python since Open GL is lacking.
Before you dive into Swift, considering watching some of Just van Rossum 's 
videos on YouTube for inspirations. Just is a font designer who also happens to 
be brother of Guido (inventor of Python). Just uses Mac OS as most graphics 
designer people do, and you would be amazed what you can do with Python 
GUI-wise on Mac OS, if your brother happens to be the most knowledgeable person 
about Python in the world :-) ... and check out Just's various software on 
github too after you check out the videos.
I think Just uses pyobjc (python binding to objective c), which is bunded on 
mac os x's shipped Python. But, have a look at what Just uses lately; he may 
have some swift stuff too. Anyway, he is Mac OS-based, and his software works 
are open-source and mostly about fonts, so you just find plenty to take 
inspiration on. (I don't think he subscribes to freetype-devel, but I could be 
wrong...)

On Thursday, 2 May 2024 at 09:59:52 BST, Ahmet Göksu  
wrote:  
 
 Thank you for your guidance. 

I agree with your assessment and prefer to use Swift. It seems well-suited for 
future-proofing our project.
Best,Goksugoksu.inOn May 2, 2024 at 11:17 +0300, suzuki toshiya 
, wrote:

Dear Ahmet,

The development of native GUI application for macOS have 3 choices:
1) Use C and Carbon framework (now obsoleted)
2) Objective-C and Cocoa framework
3) Swift

I think 2) or 3) are (still) reasonable options, but 1) is not anymore.
I'm unfamiliar with a market trend for Apple products, but sometimes
I hear a few people (working for iOS softwares) promoting Swift as
Swift is in, and Objective-C is out.

Also, there would be alternative approach, like Qt, to keep from playing
with Apple-specific technologies.

Do you have any preference?

Regards,
mpsuzuki

On 2024/05/02 14:30, Ahmet Göksu wrote:

Hi Suzuki,

Thank you, I am so excited to work with you!

The new goal is Native Graphics Backend for FreeType Demos on macOS.
I have updated on the GSoC website but the proposal file is unable to change.

Here you can find my proposal in the attachments.

Best,
Goksu
goksu.in
On May 2, 2024 at 03:56 +0300, suzuki toshiya , 
wrote:
Dear Ahmet,

Congratulation! I'm glad to find another macOS contributor in
FreeType.

Please could you provide the updated estimation of the schedule,
with new goal (native graphics backend for macOS, without X11)?
The filed schedule dated on April 2nd was written for older goal
(an improvement of ftbench and related).

Regards,
mpsuzuki

On 2024/05/02 4:31, Ahmet Göksu wrote:
Hello!
Its Ahmet Goksu, last years GSoC contributor on ftbench.
This year, I will be contributing development graphics backend natively on 
macOS without X11.

Its so exciting to be here again!

here are my infos to connect:

https://www.linkedin.com/in/ahmetgoksu/
https://github.com/goeksu
https://resume.goksu.in

Best,
Goksu
goksu.in






  

Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread suzuki toshiya

Good to hear that you have your own preference!
I would prepare Swift environment in my side :-)

Regards,
mpsuzuki

P.S.
SVG Native Viewer has a small demo written in
Objective-C with Cocoa framework.

On 2024/05/02 17:59, Ahmet Göksu wrote:

Thank you for your guidance.

I agree with your assessment and prefer to use Swift. It seems well-suited for 
future-proofing our project.

Best,
Goksu
goksu.in
On May 2, 2024 at 11:17 +0300, suzuki toshiya , 
wrote:
Dear Ahmet,

The development of native GUI application for macOS have 3 choices:
1) Use C and Carbon framework (now obsoleted)
2) Objective-C and Cocoa framework
3) Swift

I think 2) or 3) are (still) reasonable options, but 1) is not anymore.
I'm unfamiliar with a market trend for Apple products, but sometimes
I hear a few people (working for iOS softwares) promoting Swift as
Swift is in, and Objective-C is out.

Also, there would be alternative approach, like Qt, to keep from playing
with Apple-specific technologies.

Do you have any preference?

Regards,
mpsuzuki

On 2024/05/02 14:30, Ahmet Göksu wrote:
Hi Suzuki,

Thank you, I am so excited to work with you!

The new goal is Native Graphics Backend for FreeType Demos on macOS.
I have updated on the GSoC website but the proposal file is unable to change.

Here you can find my proposal in the attachments.

Best,
Goksu
goksu.in
On May 2, 2024 at 03:56 +0300, suzuki toshiya , 
wrote:
Dear Ahmet,

Congratulation! I'm glad to find another macOS contributor in
FreeType.

Please could you provide the updated estimation of the schedule,
with new goal (native graphics backend for macOS, without X11)?
The filed schedule dated on April 2nd was written for older goal
(an improvement of ftbench and related).

Regards,
mpsuzuki

On 2024/05/02 4:31, Ahmet Göksu wrote:
Hello!
Its Ahmet Goksu, last years GSoC contributor on ftbench.
This year, I will be contributing development graphics backend natively on 
macOS without X11.

Its so exciting to be here again!

here are my infos to connect:

https://www.linkedin.com/in/ahmetgoksu/
https://github.com/goeksu
https://resume.goksu.in

Best,
Goksu
goksu.in









Re: which language you would use for X11-less macOS graphic framework?

2024-05-02 Thread Ahmet Göksu
Thank you for your guidance.

I agree with your assessment and prefer to use Swift. It seems well-suited for 
future-proofing our project.

Best,
Goksu
goksu.in
On May 2, 2024 at 11:17 +0300, suzuki toshiya , 
wrote:
> Dear Ahmet,
>
> The development of native GUI application for macOS have 3 choices:
> 1) Use C and Carbon framework (now obsoleted)
> 2) Objective-C and Cocoa framework
> 3) Swift
>
> I think 2) or 3) are (still) reasonable options, but 1) is not anymore.
> I'm unfamiliar with a market trend for Apple products, but sometimes
> I hear a few people (working for iOS softwares) promoting Swift as
> Swift is in, and Objective-C is out.
>
> Also, there would be alternative approach, like Qt, to keep from playing
> with Apple-specific technologies.
>
> Do you have any preference?
>
> Regards,
> mpsuzuki
>
> On 2024/05/02 14:30, Ahmet Göksu wrote:
> > Hi Suzuki,
> >
> > Thank you, I am so excited to work with you!
> >
> > The new goal is Native Graphics Backend for FreeType Demos on macOS.
> > I have updated on the GSoC website but the proposal file is unable to 
> > change.
> >
> > Here you can find my proposal in the attachments.
> >
> > Best,
> > Goksu
> > goksu.in
> > On May 2, 2024 at 03:56 +0300, suzuki toshiya , 
> > wrote:
> > Dear Ahmet,
> >
> > Congratulation! I'm glad to find another macOS contributor in
> > FreeType.
> >
> > Please could you provide the updated estimation of the schedule,
> > with new goal (native graphics backend for macOS, without X11)?
> > The filed schedule dated on April 2nd was written for older goal
> > (an improvement of ftbench and related).
> >
> > Regards,
> > mpsuzuki
> >
> > On 2024/05/02 4:31, Ahmet Göksu wrote:
> > Hello!
> > Its Ahmet Goksu, last years GSoC contributor on ftbench.
> > This year, I will be contributing development graphics backend natively on 
> > macOS without X11.
> >
> > Its so exciting to be here again!
> >
> > here are my infos to connect:
> >
> > https://www.linkedin.com/in/ahmetgoksu/
> > https://github.com/goeksu
> > https://resume.goksu.in
> >
> > Best,
> > Goksu
> > goksu.in
> >
> >
> >
>