1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680
|
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#define G_LOG_DOMAIN "Gtk"
#if !defined(PERLIO_IS_STDIO) && defined(HASATTRIBUTE)
# undef printf
#endif
#include <gtk/gtk.h>
#if !defined(PERLIO_IS_STDIO) && defined(HASATTRIBUTE)
# define printf PerlIO_stdoutf
#endif
#include "GtkTypes.h"
#include "GdkTypes.h"
#include "MiscTypes.h"
#include "GtkDefs.h"
static char **
XS_unpack_charPtrPtr (SV * sv) {
char ** result;
AV * av;
int i;
if (!sv || !SvROK(sv) || SvTYPE(SvRV(sv)) != SVt_PVAV)
return NULL;
av = (AV*)SvRV(sv);
result = pgtk_alloc_temp(sizeof(char*)*(av_len(av)+1));
for (i=0; i < av_len(av); ++i)
result[i] = SvPV(*av_fetch(av, i, 0), PL_na);
result[i] = NULL;
return result;
}
MODULE = Gtk12 PACKAGE = Gtk::Gdk::Window PREFIX = gdk_window_
void
gdk_window_set_geometry_hints (window, geometry, flags)
Gtk::Gdk::Window window
Gtk::Gdk::Geometry geometry
Gtk::Gdk::WindowHints flags
void
gdk_window_register_dnd (window)
Gtk::Gdk::Window window
MODULE = Gtk12 PACKAGE = Gtk::Window PREFIX = gtk_window_
void
gtk_window_set_geometry_hints (window, geometry_widget, geometry, flags)
Gtk::Window window
Gtk::Widget geometry_widget
Gtk::Gdk::Geometry geometry
Gtk::Gdk::WindowHints flags
#if GTK_HVER >= 0x010206
void
gtk_window_reposition (window, x, y)
Gtk::Window window
gint x
gint y
#endif
void
gtk_window_add_embedded_xid (window, xid)
Gtk::Window window
guint xid
ALIAS:
Gtk::Window::add_embedded_xid = 0
Gtk::Window::remove_embedded_xid = 1
CODE:
if (ix == 0)
gtk_window_add_embedded_xid (window, xid);
else if (ix == 1)
gtk_window_remove_embedded_xid (window, xid);
void
gtk_window_add_accel_group(window, accel_group)
Gtk::Window window
Gtk::AccelGroup accel_group
void
gtk_window_remove_accel_group(window, accel_group)
Gtk::Window window
Gtk::AccelGroup accel_group
MODULE = Gtk12 PACKAGE = Gtk::Menu PREFIX = gtk_menu_
void
gtk_menu_set_accel_group (menu, accel_group)
Gtk::Menu menu
Gtk::AccelGroup accel_group
Gtk::AccelGroup_OrNULL
gtk_menu_get_accel_group (menu)
Gtk::Menu menu
ALIAS:
Gtk::Menu::get_accel_group = 0
Gtk::Menu::get_unline_accel_group = 1
Gtk::Menu::ensure_unline_accel_group = 2
CODE:
switch (ix) {
case 0: gtk_menu_get_accel_group (menu); break;
case 1: gtk_menu_get_uline_accel_group (menu); break;
case 2: gtk_menu_ensure_uline_accel_group (menu); break;
}
void
gtk_menu_reorder_child (menu, child, position)
Gtk::Menu menu
Gtk::Widget child
gint position
MODULE = Gtk12 PACKAGE = Gtk::Widget PREFIX = gtk_
void
gtk_drag_get_data (widget, context, target, time)
Gtk::Widget widget
Gtk::Gdk::DragContext context
Gtk::Gdk::Atom target
int time
void
gtk_drag_dest_set (widget, flags, actions, ...)
Gtk::Widget widget
Gtk::DestDefaults flags
Gtk::Gdk::DragAction actions
CODE:
{
int nt = items - 3;
int i;
GtkTargetEntry * targets = (GtkTargetEntry*)g_malloc(sizeof(GtkTargetEntry)*nt);
for (i=3; i <items;++i)
targets[i-3] = *SvGtkTargetEntry(ST(i));
gtk_drag_dest_set(widget, flags, targets, nt, actions);
g_free(targets);
}
void
gtk_drag_dest_set_proxy (widget, proxy_window, protocol, use_coordinates)
Gtk::Widget widget
Gtk::Gdk::Window proxy_window
Gtk::Gdk::DragProtocol protocol
gboolean use_coordinates
void
gtk_drag_source_set (widget, start_button_mask, actions, ...)
Gtk::Widget widget
Gtk::Gdk::ModifierType start_button_mask
Gtk::Gdk::DragAction actions
CODE:
{
int nt = items - 3;
int i;
GtkTargetEntry * targets = (GtkTargetEntry*)g_malloc(sizeof(GtkTargetEntry)*nt);
for (i=3; i <items;++i)
targets[i-3] = *SvGtkTargetEntry(ST(i));
gtk_drag_source_set(widget, start_button_mask, targets, nt, actions);
g_free(targets);
}
void
gtk_drag_source_set_icon (widget, colormap=NULL, pixmap=NULL, mask=NULL)
Gtk::Widget widget
Gtk::Gdk::Colormap_OrNULL colormap
Gtk::Gdk::Pixmap_OrNULL pixmap
Gtk::Gdk::Bitmap_OrNULL mask
Gtk::Gdk::DragContext
gtk_drag_begin(widget, targets, actions, button, event)
Gtk::Widget widget
Gtk::TargetList targets
Gtk::Gdk::DragAction actions
int button
Gtk::Gdk::Event event
MODULE = Gtk12 PACKAGE = Gtk::Gdk::DragContext PREFIX = gdk_drag_context_
Gtk::Gdk::DragContext
gdk_drag_context_new (Class)
SV * Class
CODE:
RETVAL = gdk_drag_context_new();
sv_2mortal(newSVGdkDragContext(RETVAL));
gdk_drag_context_unref(RETVAL);
OUTPUT:
RETVAL
void
gdk_drag_context_ref (context)
Gtk::Gdk::DragContext context
void
gdk_drag_context_unref (context)
Gtk::Gdk::DragContext context
MODULE = Gtk12 PACKAGE = Gtk::Gdk::DragContext PREFIX = gdk_drag_
#ARG: ... list (list of Gtk::Gdk::Atom)
Gtk::Gdk::DragContext
gdk_drag_begin (Class, window, ...)
SV * Class
Gtk::Gdk::Window window
CODE:
{
GList * tmp_list = NULL;
int i;
for (i= 2; i < items; ++i) {
tmp_list = g_list_prepend(tmp_list, GUINT_TO_POINTER(SvGdkAtom(ST(i))));
}
tmp_list = g_list_reverse(tmp_list);
RETVAL = gdk_drag_begin(window, tmp_list);
g_list_free(tmp_list);
}
OUTPUT:
RETVAL
void
gdk_drag_status (context, action, time=GDK_CURRENT_TIME)
Gtk::Gdk::DragContext context
Gtk::Gdk::DragAction action
int time
void
gdk_drop_reply (context, ok, time=GDK_CURRENT_TIME)
Gtk::Gdk::DragContext context
gboolean ok
int time
void
gdk_drop_finish (context, success, time=GDK_CURRENT_TIME)
Gtk::Gdk::DragContext context
gboolean success
int time
Gtk::Gdk::Atom
gdk_drag_get_selection (context)
Gtk::Gdk::DragContext context
void
gdk_drag_get_protocol (Class, xid)
SV * Class
guint32 xid
PPCODE:
{
GdkDragProtocol protocol;
guint32 retval;
retval = gdk_drag_get_protocol(xid, &protocol);
XPUSHs(sv_2mortal(newSViv(retval)));
XPUSHs(sv_2mortal(newSVGdkDragProtocol(protocol)));
}
void
gdk_drag_find_window (context, drag_window, x_root, y_root)
Gtk::Gdk::DragContext context
Gtk::Gdk::Window drag_window
int x_root
int y_root
PPCODE:
{
GdkWindow * dest_window;
GdkDragProtocol protocol;
gdk_drag_find_window (context, drag_window, x_root, y_root, &dest_window, &protocol);
XPUSHs(sv_2mortal(newSVGdkWindow(dest_window)));
XPUSHs(sv_2mortal(newSVGdkDragProtocol(protocol)));
}
gboolean
gdk_drag_motion (context, dest_window, protocol, x_root, y_root, suggested_action, possible_action, time=GDK_CURRENT_TIME)
Gtk::Gdk::DragContext context
Gtk::Gdk::Window dest_window
Gtk::Gdk::DragProtocol protocol
int x_root
int y_root
Gtk::Gdk::DragAction suggested_action
Gtk::Gdk::DragAction possible_action
guint32 time
void
gdk_drag_drop (context, time=GDK_CURRENT_TIME)
Gtk::Gdk::DragContext context
guint32 time
void
gdk_drag_abort (context, time=GDK_CURRENT_TIME)
Gtk::Gdk::DragContext context
guint32 time
Gtk::Gdk::DragAction
suggested_action (context)
Gtk::Gdk::DragContext context
CODE:
RETVAL = context->suggested_action;
OUTPUT:
RETVAL
#OUTPUT: list
#RETURNS: a list of targets (integers)
void
targets (context)
Gtk::Gdk::DragContext context
PPCODE:
{
GList * tmpl = context->targets;
while(tmpl) {
XPUSHs(sv_2mortal(newSViv(GPOINTER_TO_UINT(tmpl->data))));
tmpl = tmpl->next;
}
}
MODULE = Gtk12 PACKAGE = Gtk::Gdk::DragContext PREFIX = gtk_drag_
void
gtk_drag_finish(context, success, del, time=GDK_CURRENT_TIME)
Gtk::Gdk::DragContext context
gboolean success
gboolean del
int time
Gtk::Widget_OrNULL_Up
gtk_drag_get_source_widget (context)
Gtk::Gdk::DragContext context
void
gtk_drag_set_icon_widget (context, widget, hot_x, hot_y)
Gtk::Gdk::DragContext context
Gtk::Widget widget
int hot_x
int hot_y
void
gtk_drag_set_icon_pixmap (context, colormap, pixmap, mask, hot_x, hot_y)
Gtk::Gdk::DragContext context
Gtk::Gdk::Colormap_OrNULL colormap
Gtk::Gdk::Pixmap_OrNULL pixmap
Gtk::Gdk::Bitmap_OrNULL mask
int hot_x
int hot_y
void
gtk_drag_set_icon_default (context)
Gtk::Gdk::DragContext context
void
gtk_drag_set_default_icon (Class, colormap, pixmap, mask, hot_x, hot_y)
SV * Class
Gtk::Gdk::Colormap_OrNULL colormap
Gtk::Gdk::Pixmap_OrNULL pixmap
Gtk::Gdk::Bitmap_OrNULL mask
int hot_x
int hot_y
CODE:
gtk_drag_set_default_icon (colormap, pixmap, mask, hot_x, hot_y);
MODULE = Gtk12 PACKAGE = Gtk::TargetList PREFIX = gtk_target_list_
Gtk::TargetList
gtk_target_list_new (Class, ...)
SV * Class
CODE:
{
int nt = items - 1;
int i;
GtkTargetEntry * targets = (GtkTargetEntry*)g_malloc(sizeof(GtkTargetEntry)*nt);
for (i=1; i <items;++i)
targets[i-1] = *SvGtkTargetEntry(ST(i));
RETVAL = gtk_target_list_new(targets, nt);
g_free(targets);
}
OUTPUT:
RETVAL
void
gtk_target_list_ref (target_list)
Gtk::TargetList target_list
void
gtk_target_list_unref (target_list)
Gtk::TargetList target_list
void
gtk_target_list_add (target_list, target, flags, info)
Gtk::TargetList target_list
Gtk::Gdk::Atom target
int flags
int info
void
gtk_target_list_add_table (target_list, ...)
Gtk::TargetList target_list
CODE:
{
int nt = items - 1;
int i;
GtkTargetEntry * targets = (GtkTargetEntry*)g_malloc(sizeof(GtkTargetEntry)*nt);
for (i=1; i <items;++i)
targets[i-1] = *SvGtkTargetEntry(ST(i));
gtk_target_list_add_table(target_list, targets, nt);
g_free(targets);
}
void
gtk_target_list_remove (target_list, target)
Gtk::TargetList target_list
Gtk::Gdk::Atom target
void
gtk_target_list_find (target_list, target)
Gtk::TargetList target_list
Gtk::Gdk::Atom target
PPCODE:
{
guint info;
if (gtk_target_list_find(target_list, target, &info))
XPUSHs(sv_2mortal(newSViv(info)));
}
MODULE = Gtk12 PACKAGE = Gtk::Button PREFIX = gtk_button_
Gtk::ReliefStyle
gtk_button_get_relief (button)
Gtk::Button button
void
gtk_button_set_relief (button, style)
Gtk::Button button
Gtk::ReliefStyle style
MODULE = Gtk12 PACKAGE = Gtk::ScrolledWindow PREFIX = gtk_scrolled_window_
void
gtk_scrolled_window_set_hadjustment (scrolled_window, adj)
Gtk::ScrolledWindow scrolled_window
Gtk::Adjustment adj
void
gtk_scrolled_window_set_vadjustment (scrolled_window, adj)
Gtk::ScrolledWindow scrolled_window
Gtk::Adjustment adj
void
gtk_scrolled_window_set_placement (scrolled_window, window_placement)
Gtk::ScrolledWindow scrolled_window
Gtk::CornerType window_placement
MODULE = Gtk12 PACKAGE = Gtk::Widget PREFIX = gtk_widget_
void
gtk_widget_size_allocate (widget, allocation)
Gtk::Widget widget
Gtk::Allocation allocation
void
gtk_widget_size_request (widget, request=0)
Gtk::Widget widget
Gtk::Requisition request
PPCODE:
{
gtk_widget_size_request (widget, request);
EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv(request->width)));
PUSHs(sv_2mortal(newSViv(request->height)));
}
void
gtk_widget_set_visual (widget, visual)
Gtk::Widget widget
Gtk::Gdk::Visual visual
void
gtk_widget_set_colormap (widget, colormap)
Gtk::Widget widget
Gtk::Gdk::Colormap colormap
gboolean
gtk_widget_set_scroll_adjustments (widget, hadj, vadj)
Gtk::Widget widget
Gtk::Adjustment hadj
Gtk::Adjustment vadj
void
gtk_widget_set_parent_window (widget, window)
Gtk::Widget widget
Gtk::Gdk::Window window
Gtk::Gdk::Window_OrNULL
gtk_widget_get_parent_window (widget)
Gtk::Widget widget
gstring
gtk_widget_get_composite_name (widget)
Gtk::Widget widget
void
gtk_widget_set_composite_name (widget, name)
Gtk::Widget widget
char * name
void
gtk_widget_set_app_paintable (widget, paintable)
Gtk::Widget widget
gboolean paintable
gboolean
gtk_widget_accelerators_locked (widget)
Gtk::Widget widget
void
gtk_widget_remove_accelerator (widget, accel_group, accel_key, accel_mods)
Gtk::Widget widget
Gtk::AccelGroup accel_group
guint accel_key
Gtk::Gdk::ModifierType accel_mods
void
gtk_widget_remove_accelerators (widget, accel_signal, visible_only)
Gtk::Widget widget
char* accel_signal
gboolean visible_only
void
gtk_widget_add_accelerator (widget, accel_signal, accel_group, accel_key, accel_mods, accel_flags)
Gtk::Widget widget
char* accel_signal
Gtk::AccelGroup accel_group
guint accel_key
Gtk::Gdk::ModifierType accel_mods
Gtk::AccelFlags accel_flags
guint
gtk_widget_accelerator_signal (widget, accel_group, accel_key, accel_mods)
Gtk::Widget widget
Gtk::AccelGroup accel_group
guint accel_key
Gtk::Gdk::ModifierType accel_mods
void
gtk_widget_queue_draw_area (widget, x, y, width, height)
Gtk::Widget widget
int x
int y
int width
int height
void
gtk_widget_queue_clear_area (widget, x, y, width, height)
Gtk::Widget widget
int x
int y
int width
int height
void
gtk_widget_push_composite_child (Class)
SV * Class
CODE:
gtk_widget_push_composite_child();
void
gtk_widget_pop_composite_child (Class)
SV * Class
CODE:
gtk_widget_pop_composite_child();
void
gtk_widget_path (widget)
Gtk::Widget widget
PPCODE:
{
guint len;
gchar * path;
gchar * rpath;
gtk_widget_path(widget, &len, &path, &rpath);
XPUSHs(sv_2mortal(newSVpv(path, len)));
XPUSHs(sv_2mortal(newSVpv(rpath, len)));
g_free(path);
g_free(rpath);
}
void
gtk_widget_class_path (widget)
Gtk::Widget widget
PPCODE:
{
guint len;
gchar * path;
gchar * rpath;
gtk_widget_class_path(widget, &len, &path, &rpath);
XPUSHs(sv_2mortal(newSVpv(path, len)));
XPUSHs(sv_2mortal(newSVpv(rpath, len)));
g_free(path);
g_free(rpath);
}
void
gtk_widget_modify_style (widget, rcstyle)
Gtk::Widget widget
Gtk::RcStyle rcstyle
gint
gtk_widget_is_ancestor (widget, ancestor)
Gtk::Widget widget
Gtk::Widget ancestor
gint
gtk_widget_hide_on_delete (widget)
Gtk::Widget widget
#if 0
# FIXME: destroyed is already mapped to a widget flag :-(
void
gtk_widget_destroyed (widget)
Gtk::Widget widget
PPCODE:
{
GtkWidget * res=NULL;
gtk_widget_destroyed (widget, &res);
if (res)
XPUSHs(sv_2mortal(newSVGtkWidget(res)));
}
#endif
void
gtk_widget_add_events (widget, events)
Gtk::Widget widget
Gtk::Gdk::EventMask events
MODULE = Gtk12 PACKAGE = Gtk::FontSelection PREFIX = gtk_font_selection_
#ARG: $foundries reference (reference to an array of foundries; may be undef)
#ARG: $weights reference (reference to an array of weights; may be undef)
#ARG: $slants reference (reference to an array of slants; may be undef)
#ARG: $setwidths reference (reference to an array of setwidths; may be undef)
#ARG: $spacings reference (reference to an array of spacings; may be undef)
#ARG: $charsets reference (reference to an array of charsets; may be undef)
void
gtk_font_selection_set_filter (fsel, filter_type, font_type, foundries, weights, slants, setwidths, spacings, charsets)
Gtk::FontSelection fsel
Gtk::FontFilterType filter_type
Gtk::FontType font_type
char ** foundries
char ** weights
char ** slants
char ** setwidths
char ** spacings
char ** charsets
MODULE = Gtk12 PACKAGE = Gtk::FontSelectionDialog PREFIX = gtk_font_selection_dialog_
#ARG: $foundries reference (reference to an array of foundries; may be undef)
#ARG: $weights reference (reference to an array of weights; may be undef)
#ARG: $slants reference (reference to an array of slants; may be undef)
#ARG: $setwidths reference (reference to an array of setwidths; may be undef)
#ARG: $spacings reference (reference to an array of spacings; may be undef)
#ARG: $charsets reference (reference to an array of charsets; may be undef)
void
gtk_font_selection_dialog_set_filter (fsel, filter_type, font_type, foundries, weights, slants, setwidths, spacings, charsets)
Gtk::FontSelectionDialog fsel
Gtk::FontFilterType filter_type
Gtk::FontType font_type
char ** foundries
char ** weights
char ** slants
char ** setwidths
char ** spacings
char ** charsets
|