Is there a way to detect the current keyboard layout (i.e. "us", "de", "de_CH", "it"...) under GTK3 in a portable way?
I don't need mswindows compatilibity, only linux, but it should work with both Xorg and Wayland backends and under different desktop environments.
I have found the GdkKeymap class and gdk_keymap_get_for_display() function, but I can't see a function to get an identifier for the nationality/model/map of the keyboard.
Thank you
Related
Just to clarify, I'm not talking about making the background of the editing frame or window dark via:
local G = ...
styles = G.loadfile('cfg/tomorrow.lua')('Zenburn') -- theme
I'm talking about making the background of the Project frame/window, Output window, the menu bar, etc., all dark too.
Is this possible to do without using Windows's high-contrast theme for everything?
Thank you.
I don't think this is possible, as it relies on wxwidgets to draw those windows and wxwidgets uses system-provided colors to draw them (without much if any user control).
I opened a wxwidgets ticket that would implement re-configuring system colors, but there hasn't been much movement on it.
I know Wayland protocol doesn't provide option to control shell surface position on the screen. I would like to find a way for controlling window/surface placement. I have tried tools like xdotool and wmctrl, but they only recognize XWayland windows. I am using Gnome Shell so the window manager is Mutter. Why is surface location not part of Wayland protocol? What would be the suggested way or ways for controlling Wayland surface placement programmatically?
Edit:
Wayland client-protocol provides interface for sub-surfaces and it is sufficient for my purposes at the moment. However window I would hope protocol to include top-level window position option. I could make gnome-shell extension with, javascript? But not really an option in this case.
I have a simple Java phone with touchscreen capabilities.In the 'Write Message' section a simple/normal keyboard(Non-Qwerty) is there to compose messages.Now my questions is, whether this default [simple/normal keyboard(Non-Qwerty)] is called Native Keyboard or it's something different altogether?
When a phone does not have a physical keyboard we call the virtual keyboard (shown on screen) as native keyboard.
If you use LCDUI Forms or TextBox this keyboard is presented automatically by the Java Virtual Machine.
How you keep gtk window fixed on screen like a taskbar or keep some space like taskbar reserved for our gtk window, Do i need to write some WM plugin. if it helps my wm is metacity, and can you integrate gtk with xlib program, actually I was developing a basic WM and feels the need for both xlib and gtk, doing anything with gtk in my wm simply crashes it.
The NetWM/EWMH protocol supports docks/taskbars via setting the _NET_WM_WINDOW_TYPE property to _NET_WM_WINDOW_TYPE_DOCK.
I am working on embedded system, with own windowing system and rendering library. Before someday when I installed Ubuntu, to my surprise it has LCD subpixel rendering. It really looks cool to have it on my device. Because it is very readable.
Currently I ask for particular glyph in freetype, freetype gives me one memory buffer with values of alpha, with that it is not possible to have subpixel rendering. What I have is normal antialiazed font. As in subpixel - rendering left most pixel of font is anti-aliazed with Red and Rightmost with Blue ( Assuming Screen is RGB ).
Is there any methods with which freetype can give me information that whether current pixel is left or right or centerone?
Thanks, Sunny.
freetype can do it
As you point out, the desktop environment you're using (GNOME, KDE, whatever) may implement this. The setting for it varies by environment.
As to how to do it in your own code, you can use the same routines the window manager does (Gtk+ on GNOME, Qt on KDE, etc.), or you can use a separate library like FreeType or SDL_ttf. Antialiasing -- the generic term for this, as ClearType is a patented algorithm specific to Microsoft -- is usually optional in these libraries, disabled by default for speed.
I think that libcairo is at the bottom of most GTK applications in Ubuntu that do antialiasing. I think that whether subpixel rendering is done specifically for an LCD screen is something the user chooses, not the application author. The user controls it through the "Fonts" tab of "Appearance Preferences" in System -> Preferences -> Appearance (which can be run manually as the binary "gnome-appearance-properties") and clicking on the "Subpixel smoothing (LCDs)" option.
Maybe there's a way that an application can override this setting for themselves? Not sure why they'd want to, though, since an app doesn't control what kind of display the user is using.