Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 08-10-2018, 05:59 AM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default WDL/SWELL: Which mouse cursor file types can be loaded in Linux and MacOS?

Which mouse cursor file types can SWELL_LoadCursorFromFile load in both Linux and MacOS?

I assume that SWELL can load plain .cur files, but what about .ani for animated cursors?
juliansader is offline   Reply With Quote
Old 08-10-2018, 03:16 PM   #2
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

SWELL_LoadCursorFromFile calls gdk_pixbuf_new_from_file to load the file, but the GTK manual is rather vague on valid formats for gdk_pixbuf_new_from_file.
juliansader is offline   Reply With Quote
Old 08-10-2018, 03:41 PM   #3
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

The formats GdkPixbuf supports is configurable so it may vary from system to system.

https://gitlab.gnome.org/GNOME/gdk-p...oading-library
Quote:
GdkPixbuf can load image data encoded in different formats, such as:
  • PNG
  • JPEG
  • TIFF
  • TGA
  • GIF
https://stackoverflow.com/questions/...age-by-default

For macOS SWELL (which doesn't use GDK): https://developer.apple.com/document...appkit/nsimage
Quote:
The NSImage class itself is capable of managing image data in a variety of formats. The specific list of formats is dependent on the version of the operating system but includes many standard formats such as TIFF, JPEG, GIF, PNG, and PDF among others. [...] You can get a list of supported formats using the methods described in Determining the Supported Image Types.
cfillion is offline   Reply With Quote
Old 08-12-2018, 11:42 PM   #4
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by cfillion View Post
The formats GdkPixbuf supports is configurable so it may vary from system to system.
This is why I need to make sure that .cur and .ani files can reliably be loaded on all systems.
juliansader is offline   Reply With Quote
Old 09-17-2018, 11:23 AM   #5
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

According to Justin at askjf:

Quote:
Question: Which cursor file types can be loaded by SWELL_LoadFileFromCursor in both MacOS and Linux? In particular, can SWELL load .cur and .ani files? [permalink]
Asked by Julian (144.217.60.x) on September 1 2018, 9:24pm
Reply on September 2 2018, 10:14am:

Not sure if there’s overlap, the mac one wraps NSCursor, the linux wraps a cairo function...
juliansader is offline   Reply With Quote
Old 09-20-2018, 06:16 AM   #6
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

Quote:
Originally Posted by juliansader View Post
This is why I need to make sure that .cur and .ani files can reliably be loaded on all systems.
.cur yes, .ani probably not. .cur is probably a subset too, there are almost certainly variations on it that won't load.

Also worth noting that the macOS and cairo APIs don't deal with the hotspot, so SWELL has code to parse that separately...
Justin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.