aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
2020-05-21Add HEIF supportCarlo Abelli
Support the HEIF format using libheif.
2019-09-02libnsgif: Add libnsgif backendHarry Jeffery
2019-08-21Reduce backend boilerplateHarry Jeffery
2019-08-21imv: Use generic list for backends, not a linked listHarry Jeffery
2019-02-02Add libtiff backendHarry Jeffery
2019-01-31Add libjpeg-turbo backendHarry Jeffery
2019-01-29Make backends optionalHarry Jeffery
2019-01-29Add rsvg backendHarry Jeffery
2019-01-29Support multiple backendsHarry Jeffery
2017-11-25Don't duplicate license text in all source filesHarry Jeffery
If moving to dual-licensing, this text will be confusing. It's also a lot of noise.
2017-11-23Add support for a basic config fileHarry Jeffery
2017-06-06Switch to new implementationHarry Jeffery
2017-04-15Let commands take an arbitrary pointerHarry Jeffery
2017-04-14Fix command text inputHarry Jeffery
2017-04-14Minor clean up of main.cHarry Jeffery
2017-04-14Move parse_args to end of main.cHarry Jeffery
2017-04-14Move some globals back to localsHarry Jeffery
2017-04-14Move rendering into its own functionHarry Jeffery
2017-04-14Refactor navigator poll rate limitingHarry Jeffery
2017-04-14Move event handling into its own functionHarry Jeffery
2017-04-14Refactor navigator to new styleHarry Jeffery
2017-04-14Refactor viewport to new styleHarry Jeffery
2017-04-14Refactor texture to new styleHarry Jeffery
2017-04-14Refactor loader to new styleHarry Jeffery
2017-04-14Let's not have imv_commands use hidden globalsHarry Jeffery
2017-04-14Add some aliasesHarry Jeffery
2017-04-14Add a rough command modeHarry Jeffery
2017-04-12Move basic functionality into commandsHarry Jeffery
2017-03-06Add command 'X' to remove image from disk tooNicolas Cornu
2017-02-09Show image scale in window titleMark Oteiza
2016-12-28Store getopt() return in a signed variablecrasm
On certain platforms [0] a char may be unsigned [1]. The loop for getopt would loop forever because: (char)-1 => 255 and 255 != -1 A signed char also worked. I don't know what that would mean for performance or portability. int feels simpler to me. [0]: I'm using Arch Linux ARM on the Samsung Chromebook 2, which is armv7h. Not sure about other ARM platforms. With this fix, imv appears to work correctly. details: https://archlinuxarm.org/platforms/armv7/samsung/samsung-chromebook-2 [1]: http://stackoverflow.com/questions/2054939/is-char-signed-or-unsigned-by-default#2054941
2016-12-23Fix indentation errorHarry Jeffery
2016-11-16Reset slideshow timer when image changed via 'x'Harry Jeffery
When the user hits left/right to change image, the time left until the slideshow changes images is reset. If the user changes image by closing the current image, the timer is not reset. This patch resolves that.
2016-10-23Simplify hex color parserDmitrij D. Czarkoff
It is actually a trivial task for strtoul + some bit shifting, so there is no need for two separate functions.
2016-10-20Cap playback delta-time to 100 msHarry Jeffery
This prevents imv from trying to "catch up" on the time that it was asleep for by playing the gif back at high speed.
2016-09-27Fix GetWidth/GetHeight typo in main.cHarry Jeffery
2016-05-01Make imv_navigator_add() return an integer valueDmitrij D. Czarkoff
In case of error return non-zero value instead of cleaning up navigator. This way main loop may do some more cleanup, or maybe even act differently.
2016-04-29Fix uninitialized use of "last_time"Dmitrij D. Czarkoff
Set "last_time" to current time at declaration time, so that it holds at least something by the time it is used.
2016-04-29Use single buffer for title and overlayDmitrij D. Czarkoff
This allows to drop extra printing steps and memory allocations.
2016-04-26Reimplement '-x' flagDmitrij D. Czarkoff
This change effectively backs out f1737ddd06141afbe99f37af3b5c2d0f1df5fe7a, implementing the same functionality in a simpler and more correct way. Implementation details: * imv_navigator.wrapped - a new field that has value "0" by default; once navigator wraps around the list, this field recieves value "1". * imv_navigator_wrapped(&nav) - a new function that returns non-zero value iff navigator wrapped around the list. Currently just returns value of imv_navigator.wrapped. While at it, expanded "test_navigator_remove" and merged it with "test_navigator_add". Resulting test is called "test_navigator_add_remove". Fixes #94.
2016-04-26Indent fixDmitrij D. Czarkoff
2016-04-26Add vim modelinesDmitrij D. Czarkoff
2016-04-26Conditionally ignore key repeatDmitrij D. Czarkoff
For the following actions: * reset scaling ('s'), * redraw ('r'), * scale to actual size ('a'), * center image ('c'), * remove selection ('x'), * toggle fullscreen ('f'), * toggle playing (space), * print selection ('p'), * toggle overlay ('d') repeating action when key is held does not make sense. After acting upon these events ignore them until key is released or another key is pressed.
2016-04-25Make '+' work on all layoutsDmitrij D. Czarkoff
Key handling code obuses the fact that plus sign is shifted key for equals sign on US keyboard. Add '+' as a control for layouts where this is not the case.
2016-04-02Add -x switch to exit imv when reaching end of file list.Hannes Koerber
2016-03-06Read file list from standard input continuoslyDmitrij D. Czarkoff
This reduces delay before initial draw in case of slow input, opening possibilities for use cases like: $ curl -Osw "%{filename_effective}\n" "http://www.example.com/[1-10].jpg" which will download all images and start showing them once first arrives.
2016-02-08Remove tabsHarry Jeffery
2016-01-24Fix bug in slideshow timingHarry Jeffery
2016-01-16Add third scaling mode: best fitDmitrij D. Czarkoff
* Add new switches: "-S" to force (default) "perfect fit" mode and "-s" to force "best fit" mode. * Add new control key: "s" to switch scaling mode.
2016-01-16Provide some feedback to users when no arguments are givenHarry Jeffery