To use TelegramGLib on Android you need latest version of Termux app.
Don't use Termux from GooglePlay, it's outdated and will not work!
You can download it from Github or F-Droid
Convert Gtk.StateFlags
to string
public string flags_to_string(Gtk.StateFlags flags) {
var str = "";
if (Gtk.StateFlags.NORMAL in flags)
str += "NORMAL, ";
if (Gtk.StateFlags.ACTIVE in flags)
str += "ACTIVE, ";
libflow example
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Flow', '1.0')
from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import Flow
public void test_server() {
var service = new SocketService();
try {
service.add_inet_port(1500, null);
service.incoming.connect((conn) => {
try {
var dis = new DataInputStream(conn.input_stream);
message(@"Message received: $(dis.read_line())");
} catch (Error e) {
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.SheetState
import androidx.compose.material3.rememberModalBottomSheetState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
This guide will show how to build and run this project on Windows system using MSYS2
- Download and install MSYS2
- Navigate to
C:\msys64
and openmingw64.exe
- Update packages
pacman -Syyu
- Install compilers and libraries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ZoomableView : Gtk.Widget, Gtk.Scrollable { | |
private Gtk.Adjustment _hadjustment; | |
private Gtk.Adjustment _vadjustment; | |
public Gtk.Adjustment hadjustment { | |
get { | |
return _hadjustment; | |
} | |
set construct { | |
_hadjustment = value; | |
if (_hadjustment != null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DragView : Gtk.Widget { | |
construct { | |
new TestChild().set_parent(this); | |
with (var it = new Gtk.GestureDrag()) { | |
DragChild? drag_target = null; | |
Graphene.Point start_cursor_pos = { 0, 0 }; | |
Graphene.Point cursor_offset = { 0, 0 }; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Runner : Object { | |
private Thread<void> thread; | |
private MainContext ctx; | |
public Runner() { | |
ctx = new MainContext(); | |
thread = new Thread<void>("runner", () => { | |
while (true) { | |
ctx.iteration(true); | |
} |