Comments (9)
Gnome::Gtk3 0.38.0 contains Gnome::Gtk3::EntryCompletion now. Knock yourself out ;-)
from gnome-gtk3.
I did not yet document the draw signal on the Widget because of a false thought that I did not yet have the CairoContext in the Gnome::Cairo package. The cairo context, however, is the cairo_t
from that package. Anyways, the main problem however why the call fails is because you must describe the signal handler signature precisely. The gnome documents describe it like
gboolean
user_function (GtkWidget *widget,
CairoContext *cr,
gpointer user_data
)
The widget and user_data normally are provided as :$_widget
and any :$user-data
as named arguments. Those are optional and you don't need to describe them if you don't need them. However, the cairo_t
parameter is obligatory; its position and its type.
So your draw handler must be something like below to get rid of the errors
use Gnome::Cairo::Types;
…
method draw( cairo_t $cr ) {
say 'drew';
}
…
To get something working you must do much more. Please look
You can find a few examples in the xt
directory of the Gnome::Cairo package. Especially xt/c5.raku
.
from gnome-gtk3.
Hi,
I haven't yet implemented the EntryCompletion class. To get it fully functioning, I also must implement a role GtkCellLayout to make it more useful. For me, it is not yet clear which module I need to implement first and in which package. Because I was also busy writing tutorials for the Application classes and everything needed to build a complete application I was more thinking in the line of those classes involving actions and menus. Anyways, it is open for debate I assume.
There is also much rewriting going on at the moment which will break code, unfortunately. Mostly the changes are in the line of returned native objects. But now that I am adding methods for each native subroutine, these methods know at that point what to return and can therefore create a Raku object instead. Also, I can then receive and return Bool values instead of the C-integers 0 or 1 for false and true. Other types can be converted as well.
But, first things first, I need to finish the above-mentioned work!
from gnome-gtk3.
Pushed new versions;
Gnome::Glib 0.20.0
Gnome::Gio 0.18.0.1
Gnome::Gdk3 0.17.3
Gnome::Gtk3 0.37.0
from gnome-gtk3.
it worked! thanks!
from gnome-gtk3.
https://github.com/MARTIMM/gnome-cairo/blob/master/xt/c5.pl6
from gnome-gtk3.
c5.pl doesnt run for me, it gives me an error
width & height: 333 x 253
X valid: True
X surface state: CAIRO_STATUS_SUCCESS
X surface type: CAIRO_SURFACE_TYPE_XLIB
X surface content: CAIRO_CONTENT_COLOR_ALPHA
X surface device: cairo_device_t.new
width & height: 266 x 566
X valid: True
X surface state: CAIRO_STATUS_SUCCESS
X surface type: CAIRO_SURFACE_TYPE_XLIB
X surface content: CAIRO_CONTENT_COLOR_ALPHA
X surface device: cairo_device_t.new
width & height: 198 x 592
Y valid: True
Y surface state: CAIRO_STATUS_SUCCESS
Y surface type: CAIRO_SURFACE_TYPE_XLIB
Y surface content: CAIRO_CONTENT_COLOR_ALPHA
Y surface device: cairo_device_t.new
Type check failed in binding to parameter '$cr'; expected cairo_t but got Gnome::Cairo (Gnome::Cairo.new(is-...)
in method draw at /home/user/.raku/sources/3094BC8DA65E28532F5887D988415015DCC37340 (Gnome::Gtk3::Widget) line 1291
in method redraw at c5.pl6 line 226
in sub w1 at /home/user/.raku/sources/F6AA9E9400E2588222D42E8EBDAC014B28828C6A (Gnome::GObject::Object) line 658
in sub gtk_main at /usr/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 595
in method FALLBACK at /home/user/.raku/sources/B402161F1A1700B2A55800B42CCB62970438CA23 (Gnome::Gtk3::Main) line 131
Cannot unbox a type object (Nil) to int.
in sub gtk_main at /usr/share/perl6/core/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 595
in method FALLBACK at /home/user/.raku/sources/B402161F1A1700B2A55800B42CCB62970438CA23 (Gnome::Gtk3::Main) line 131
in block <unit> at c5.pl6 line 333
Died
in method FALLBACK at /home/user/.raku/sources/B402161F1A1700B2A55800B42CCB62970438CA23 (Gnome::Gtk3::Main) line 118
in block <unit> at c5.pl6 line 333
from gnome-gtk3.
I found a bug in method draw() in the Widget module expecting this cairo_t. This is already corrected but not yet published. Problem is that I also had to make changes in other packages as well and they must be published all at the same time because of dependencies. I'll try to get it done soon but don't want to make more mistakes either.
from gnome-gtk3.
Since I have your attention, is it currently possible to attach an EntryCompletion onto a SearchEntry using your amazing module?
I can't find the EntryCompletion class, so I thought that maybe through a N-GObject or a GObject it might be possible but I haven't been able to get it to work.
from gnome-gtk3.
Related Issues (20)
- crash when using threads on X11 HOT 1
- gtk_tree_selection_get_selected() in Gnome::Gtk3::TreeSelection returns error HOT 1
- native types are not always used properly HOT 1
- Installing Gnome::Gtk3 on Windows 10, MSYS2 : Cannot locate native library '(null)': error 0x7e HOT 28
- packages getting larger and slower HOT 1
- Ubuntu 20.04, failed test 'class is a 'text-button' at t/WidgetPath.t line 77 HOT 5
- Module does not install on windows HOT 5
- Could not find Gnome::Gtk3::Main HOT 1
- Container.get-children causes application to freeze HOT 3
- Returning True from delete-event signal doesn't leave window open HOT 11
- How to go through each page in a GtkNotebook HOT 5
- Can't connect to "scroll-event" signal HOT 2
- Can't connect to "draw" signal on inherited DrawingArea HOT 1
- Are templates not implemented yet? HOT 1
- Problem installing on older MacOS (10.11 El Capitan) HOT 7
- Test case failures on debian 11 (bullseye) HOT 1
- Zef can't find Gnome::Glib HOT 19
- Cannot use classes as a parent class HOT 3
- Programs crash with core dumps HOT 3
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 gnome-gtk3.