Comments (3)
Are you pointing out the use of raw pointers to the private implementation of each class? It's indeed a bad design that I haven't addressed, but luckily, it is easy to fix. I was not aware of exceptions, at least I think there is no constructor in the lib that throws or could throw exceptions. As for the second question, I primarily stick to C++11, as I haven't identified a compelling need to adopt newer standards. Is there any particular functionality from the more recent standards that you believe could be beneficial?
from louvre.
Yes, I was referring to private implementations and modern C++ starts for me with C++ 11 which also has smart pointers.
I was also wondering about the design choice of virtual classes instead of templates or std::function
callbacks which are more efficient. But I have to say, that interfaces do have a more beautiful API design. Maybe this is the reason why you chose it.
from louvre.
That's an excellent question. I had a tough time deciding between the two, including the observer pattern, even though it wouldn't have allowed for a default implementation.
Ultimately, I chose virtual methods because I realized that, while callback functions might be comfortable to work with, they can result in poorly structured projects with things scattered all over the place. Though reimplementing classes and overriding methods can be tedious, it forces you to maintain a well-structured project. Anyone familiar with creating a compositor with Louvre should be able to look at a project and immediately identify where each functionality is handled, or at least get an overall picture of it.
The LAnimation and LTimer classes use callbacks, though.
from louvre.
Related Issues (20)
- hardcoded paths HOT 3
- [Not a bug] Discussion HOT 12
- Mouse freezes HOT 4
- Immediate crash upon trying to run `louvre-views` inside Hyprland HOT 7
- Change keyboard layout non-programatically HOT 5
- Add list of compositors using Louvre to the read me HOT 2
- Black screen except for the top right text on one monitor HOT 14
- Failed to initialize output HOT 31
- Consider removing inline keyword for member function HOT 1
- Wine `winewayland.drv` require `zwp_pointer_constraints_v1` HOT 6
- GTK doesn't support `xdg_decoration_unstable_v1` but does support `org_kde_kwin_server_decoration_manager` HOT 7
- Segmentation Fault - Unknown EGL Driver HOT 6
- Customizing Shortcuts Definition HOT 7
- Waybar doesn't work - Failed to register as toplevel manager HOT 7
- Changing keyboard layouts dynamically HOT 2
- Double visible mouse pointer HOT 18
- Create an IRC channel or discord HOT 7
- Support for linux-drm-syncobj-v1 protocol HOT 6
- Lockup in getPpidFromProc HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from louvre.