mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 04:05:28 +00:00
9698c4d2f9
* gtk/Widget.custom: expose some easy bool properties for checking certain WidgetFlags. Make Allocation a settable property. * gtk/glue/widget.c: bit of glue to make Allocation settable. * gdk/Window.custom: expose UserData as a usable IntPtr property. * gdk/Gdk.metadata: hide old GetUserData/SetUserData methods. * doc/*: ran the updater. svn path=/trunk/gtk-sharp/; revision=28974
70 lines
1.6 KiB
C
70 lines
1.6 KiB
C
/* widget.c : Glue to access fields in GtkWidget.
|
|
*
|
|
* Author: Rachel Hestilow <hestilow@ximian.com>
|
|
*
|
|
* <c> 2002 Rachel Hestilow, Mike Kestner
|
|
*/
|
|
|
|
#include <gtk/gtkwidget.h>
|
|
|
|
/* Forward declarations */
|
|
GdkRectangle *gtksharp_gtk_widget_get_allocation (GtkWidget *widget);
|
|
void gtksharp_gtk_widget_set_allocation (GtkWidget *widget, GdkRectangle rect);
|
|
GdkWindow *gtksharp_gtk_widget_get_window (GtkWidget *widget);
|
|
void gtksharp_gtk_widget_set_window (GtkWidget *widget, GdkWindow *window);
|
|
int gtksharp_gtk_widget_get_state (GtkWidget *widget);
|
|
int gtksharp_gtk_widget_get_flags (GtkWidget *widget);
|
|
void gtksharp_gtk_widget_set_flags (GtkWidget *widget, int flags);
|
|
int gtksharp_gtk_widget_style_get_int (GtkWidget *widget, const char *name);
|
|
/* */
|
|
|
|
GdkRectangle*
|
|
gtksharp_gtk_widget_get_allocation (GtkWidget *widget)
|
|
{
|
|
return &widget->allocation;
|
|
}
|
|
|
|
void
|
|
gtksharp_gtk_widget_set_allocation (GtkWidget *widget, GdkRectangle rect)
|
|
{
|
|
widget->allocation = rect;
|
|
}
|
|
|
|
GdkWindow *
|
|
gtksharp_gtk_widget_get_window (GtkWidget *widget)
|
|
{
|
|
return widget->window;
|
|
}
|
|
|
|
void
|
|
gtksharp_gtk_widget_set_window (GtkWidget *widget, GdkWindow *window)
|
|
{
|
|
widget->window = window;
|
|
}
|
|
|
|
int
|
|
gtksharp_gtk_widget_get_state (GtkWidget *widget)
|
|
{
|
|
return GTK_WIDGET_STATE (widget);
|
|
}
|
|
|
|
int
|
|
gtksharp_gtk_widget_get_flags (GtkWidget *widget)
|
|
{
|
|
return GTK_WIDGET_FLAGS (widget);
|
|
}
|
|
|
|
void
|
|
gtksharp_gtk_widget_set_flags (GtkWidget *widget, int flags)
|
|
{
|
|
GTK_WIDGET_SET_FLAGS (widget, flags);
|
|
}
|
|
|
|
int
|
|
gtksharp_gtk_widget_style_get_int (GtkWidget *widget, const char *name)
|
|
{
|
|
int value;
|
|
gtk_widget_style_get (widget, name, &value, NULL);
|
|
return value;
|
|
}
|