Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 937ccf152b | |||
| fd21df7244 | |||
| 654d74bfb8 | |||
| a26c72ef79 | |||
| 6b55a14429 | |||
| bc241d62af | |||
| 2b2894490f | |||
| c0747f2c2e | |||
| b34beb9380 | |||
| 8f19099f1a | |||
| db2516af0a | |||
| bd07f846ef | |||
| d938352fb3 | |||
| 13eef432fc | |||
| 1b355ff2e0 | |||
| aa9a8702e4 | |||
| ab2109ea6b | |||
| 926eb161f8 | |||
| 61bb9bb935 | |||
| 8f55a014b1 | |||
| c3e5d80853 | |||
| 8bd77441a9 | |||
| a2af794cb0 | |||
| 0c86b28828 | |||
| 4278e91a46 | |||
| dd16d7c4c8 | |||
| 6164908bd3 | |||
| 2ff98dad03 | |||
| f33c521836 | |||
| e1159dab93 | |||
| c4f423694f | |||
| 4f2b1b3cfc | |||
| 122fa679a8 | |||
| 7302407880 | |||
| 900a23e2bb | |||
| 0f7d93492d | |||
| aee4475c0f | |||
| 1f61cb2251 | |||
| 0382e3b46c | |||
| 547b2891cb | |||
| 89614f5f72 | |||
| f5fc71fe82 | |||
| a546ae32d7 | |||
| 17578a97d6 | |||
| 9536eb654b | |||
| 4bf07aeef9 | |||
| 26b250503d | |||
| 8533824084 | |||
| 5a0d6e3fc8 | |||
| 6be466b675 | |||
| 9e6855cdb8 | |||
| a6c3e440f6 | |||
| 08d386844a | |||
| 48e98d333e |
+1
-1
@@ -25,7 +25,7 @@ variables:
|
||||
BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true"
|
||||
FEATURE_FLAGS: "-Dvulkan=enabled -Dcloudproviders=enabled"
|
||||
MESON_TEST_TIMEOUT_MULTIPLIER: 3
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v36"
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v38"
|
||||
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
|
||||
|
||||
.only-default:
|
||||
|
||||
@@ -14,6 +14,9 @@ Each Docker image has a tag composed of two parts:
|
||||
See the [container registry][registry] for the available images for each
|
||||
branch, as well as their available versions.
|
||||
|
||||
Note that using `latest` as version number will overwrite the most
|
||||
recently uploaded image in the registry.
|
||||
|
||||
### Checklist for Updating a CI image
|
||||
|
||||
- [ ] Update the `${image}.Dockerfile` file with the dependencies
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM fedora:34
|
||||
FROM fedora:36
|
||||
|
||||
RUN dnf -y install \
|
||||
adwaita-icon-theme \
|
||||
@@ -87,7 +87,6 @@ RUN dnf -y install \
|
||||
python3-wheel \
|
||||
redhat-rpm-config \
|
||||
sassc \
|
||||
systemtap-sdt-devel \
|
||||
vulkan-devel \
|
||||
wayland-devel \
|
||||
wayland-protocols-devel \
|
||||
|
||||
@@ -1,3 +1,153 @@
|
||||
Overview of Changes in 4.7.0, 07-05-2022
|
||||
========================================
|
||||
|
||||
* GtkTextView:
|
||||
- Reduce overdraws
|
||||
|
||||
* GtkViewport:
|
||||
- Default scroll-to-focus to TRUE
|
||||
|
||||
* GtkText:
|
||||
- Stop blinking when we lose focus
|
||||
|
||||
* GtkSearchEntry:
|
||||
- Make search delay configurable
|
||||
|
||||
* GtkPopoverMenu:
|
||||
- Fix RTL positioning of buttons
|
||||
|
||||
* GtkLabel:
|
||||
- Fix focus keynav with links
|
||||
|
||||
* GtkFileChooser:
|
||||
- Prevent undesirable completion popups
|
||||
- Fix a corner case in save mode
|
||||
- Keep the portal filechooser alive long enough
|
||||
|
||||
* GtkCheckButton:
|
||||
- Allow setting a custom child
|
||||
|
||||
* GtkEditableLabel:
|
||||
- Make the :editing property writable
|
||||
|
||||
* GtkColumnView:
|
||||
- Various optimizations to improve scrolling performance
|
||||
|
||||
* GtkTreeStore:
|
||||
- Allow populating tree stores from ui files
|
||||
|
||||
* GtkBoxLayout:
|
||||
- Avoid infinite loops
|
||||
|
||||
* CSS:
|
||||
- Optimize reordering within the same parent
|
||||
|
||||
* Emoji:
|
||||
- Update to CLDR v40 / Unicode 14
|
||||
- Add more locales
|
||||
|
||||
* Input:
|
||||
- Add scroll unit handling
|
||||
- Handle display changes in GtkIMMultiContext
|
||||
- Always populate GDK_AXIS_X/Y in event history
|
||||
- Don't crash for large compose tables
|
||||
|
||||
* Accessibility:
|
||||
- Fix a crash at start when orca is running
|
||||
|
||||
* Theme:
|
||||
- Refresh icons
|
||||
- Fix selection in vertical spin buttons
|
||||
- Fix selection in editable labels
|
||||
|
||||
* gdk:
|
||||
- Optimize pixel format conversions
|
||||
- Use EGL_KHR_swap_buffers_with_damage for NVidia
|
||||
|
||||
* gsk:
|
||||
- Handle large viewports
|
||||
- Prepare texture libraries for glyphy rendering
|
||||
- Don't leak big glyphs in the glyph cache
|
||||
- Align offscreen rendering with th pixel grid
|
||||
- Check for half-float support before using it
|
||||
|
||||
* Wayland:
|
||||
- Use xdg-activation protocol
|
||||
- Fix text caret coordinates
|
||||
- Fix on-screen keyboard activation
|
||||
|
||||
* MacOS:
|
||||
- Fix sluggish and reversed scrolling
|
||||
- Improve monitor detection
|
||||
- Event handling fixes
|
||||
- Fix keyboard input on popovers
|
||||
- Support OpenGL-based video playback
|
||||
- Suport fullscreen
|
||||
- Improve native filechoooser size allocation
|
||||
- Use CALayer and IOSurface for rendering
|
||||
- Use a per-monitor CVDisplayLink
|
||||
- Fix kinetic scrolling
|
||||
- Improve window placement
|
||||
- Improve multi-monitor handling
|
||||
- Start applications in the foreground
|
||||
- Fix cursor blink time
|
||||
|
||||
* Windows:
|
||||
- Fix preedit window placement on HiDPI
|
||||
|
||||
* Tools:
|
||||
- gtk4-builder-tool: Don't require a display for all commands
|
||||
- gtk4-builder-tool: Add a screenshot command
|
||||
- gtk4-node-editor: Install this utility
|
||||
|
||||
* Debugging:
|
||||
- inspector: Show more application data
|
||||
- inspector: Allow viewing PangoAttrList properties
|
||||
|
||||
* Documentation:
|
||||
- Use the gtk-builder-tool to generate screenshots
|
||||
|
||||
* Build:
|
||||
- Fix cross-compilation
|
||||
- Fix build on aarch64
|
||||
- Fix build with gcc 12
|
||||
|
||||
* Translation updates
|
||||
Basque
|
||||
Brazilian Portuguese
|
||||
British English
|
||||
Catalan
|
||||
Chinese (China)
|
||||
Chinese (Taiwan)
|
||||
Croatian
|
||||
Czech
|
||||
Danish
|
||||
Finnish
|
||||
Galician
|
||||
Georgian
|
||||
German
|
||||
Hebrew
|
||||
Hungarian
|
||||
Indonesian
|
||||
Italian
|
||||
Kazakh
|
||||
Korean
|
||||
Latvian
|
||||
Lithuanian
|
||||
Norwegian Bokmål
|
||||
Persian
|
||||
Polish
|
||||
Portuguese
|
||||
Russian
|
||||
Serbian
|
||||
Slovak
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
Turkish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in 4.6.1, 11-02-2022
|
||||
========================================
|
||||
|
||||
|
||||
@@ -354,6 +354,7 @@ typedef struct {
|
||||
|
||||
typedef union {
|
||||
BroadwayReplyBase base;
|
||||
BroadwayReplySync sync;
|
||||
BroadwayReplyEvent event;
|
||||
BroadwayReplyQueryMouse query_mouse;
|
||||
BroadwayReplyNewSurface new_surface;
|
||||
|
||||
+14
-18
@@ -219,11 +219,7 @@ static void
|
||||
client_handle_request (BroadwayClient *client,
|
||||
BroadwayRequest *request)
|
||||
{
|
||||
BroadwayReplyNewSurface reply_new_surface;
|
||||
BroadwayReplySync reply_sync;
|
||||
BroadwayReplyQueryMouse reply_query_mouse;
|
||||
BroadwayReplyGrabPointer reply_grab_pointer;
|
||||
BroadwayReplyUngrabPointer reply_ungrab_pointer;
|
||||
BroadwayReply reply;
|
||||
guint32 before_serial, now_serial;
|
||||
guint32 global_id;
|
||||
int fd;
|
||||
@@ -233,7 +229,7 @@ client_handle_request (BroadwayClient *client,
|
||||
switch (request->base.type)
|
||||
{
|
||||
case BROADWAY_REQUEST_NEW_SURFACE:
|
||||
reply_new_surface.id =
|
||||
reply.new_surface.id =
|
||||
broadway_server_new_surface (server, client->id,
|
||||
request->new_surface.x,
|
||||
request->new_surface.y,
|
||||
@@ -241,9 +237,9 @@ client_handle_request (BroadwayClient *client,
|
||||
request->new_surface.height);
|
||||
client->surfaces =
|
||||
g_list_prepend (client->surfaces,
|
||||
GUINT_TO_POINTER (reply_new_surface.id));
|
||||
GUINT_TO_POINTER (reply.new_surface.id));
|
||||
|
||||
send_reply (client, request, (BroadwayReply *)&reply_new_surface, sizeof (reply_new_surface),
|
||||
send_reply (client, request, &reply, sizeof (reply.new_surface),
|
||||
BROADWAY_REPLY_NEW_SURFACE);
|
||||
break;
|
||||
case BROADWAY_REQUEST_FLUSH:
|
||||
@@ -251,7 +247,7 @@ client_handle_request (BroadwayClient *client,
|
||||
break;
|
||||
case BROADWAY_REQUEST_SYNC:
|
||||
broadway_server_flush (server);
|
||||
send_reply (client, request, (BroadwayReply *)&reply_sync, sizeof (reply_sync),
|
||||
send_reply (client, request, &reply, sizeof (reply.sync),
|
||||
BROADWAY_REPLY_SYNC);
|
||||
break;
|
||||
case BROADWAY_REQUEST_ROUNDTRIP:
|
||||
@@ -261,11 +257,11 @@ client_handle_request (BroadwayClient *client,
|
||||
break;
|
||||
case BROADWAY_REQUEST_QUERY_MOUSE:
|
||||
broadway_server_query_mouse (server,
|
||||
&reply_query_mouse.surface,
|
||||
&reply_query_mouse.root_x,
|
||||
&reply_query_mouse.root_y,
|
||||
&reply_query_mouse.mask);
|
||||
send_reply (client, request, (BroadwayReply *)&reply_query_mouse, sizeof (reply_query_mouse),
|
||||
&reply.query_mouse.surface,
|
||||
&reply.query_mouse.root_x,
|
||||
&reply.query_mouse.root_y,
|
||||
&reply.query_mouse.mask);
|
||||
send_reply (client, request, &reply, sizeof (reply.query_mouse),
|
||||
BROADWAY_REPLY_QUERY_MOUSE);
|
||||
break;
|
||||
case BROADWAY_REQUEST_DESTROY_SURFACE:
|
||||
@@ -361,21 +357,21 @@ client_handle_request (BroadwayClient *client,
|
||||
request->move_resize.height);
|
||||
break;
|
||||
case BROADWAY_REQUEST_GRAB_POINTER:
|
||||
reply_grab_pointer.status =
|
||||
reply.grab_pointer.status =
|
||||
broadway_server_grab_pointer (server,
|
||||
client->id,
|
||||
request->grab_pointer.id,
|
||||
request->grab_pointer.owner_events,
|
||||
request->grab_pointer.event_mask,
|
||||
request->grab_pointer.time_);
|
||||
send_reply (client, request, (BroadwayReply *)&reply_grab_pointer, sizeof (reply_grab_pointer),
|
||||
send_reply (client, request, &reply, sizeof (reply.grab_pointer),
|
||||
BROADWAY_REPLY_GRAB_POINTER);
|
||||
break;
|
||||
case BROADWAY_REQUEST_UNGRAB_POINTER:
|
||||
reply_ungrab_pointer.status =
|
||||
reply.ungrab_pointer.status =
|
||||
broadway_server_ungrab_pointer (server,
|
||||
request->ungrab_pointer.time_);
|
||||
send_reply (client, request, (BroadwayReply *)&reply_ungrab_pointer, sizeof (reply_ungrab_pointer),
|
||||
send_reply (client, request, &reply, sizeof (reply.ungrab_pointer),
|
||||
BROADWAY_REPLY_UNGRAB_POINTER);
|
||||
break;
|
||||
case BROADWAY_REQUEST_FOCUS_SURFACE:
|
||||
|
||||
@@ -125,7 +125,7 @@ gdk_app_launch_context_class_init (GdkAppLaunchContextClass *klass)
|
||||
* The display that the `GdkAppLaunchContext` is on.
|
||||
*/
|
||||
g_object_class_install_property (gobject_class, PROP_DISPLAY,
|
||||
g_param_spec_object ("display", P_("Display"), P_("Display"),
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
}
|
||||
|
||||
+4
-12
@@ -357,9 +357,7 @@ gdk_clipboard_class_init (GdkClipboardClass *class)
|
||||
* The `GdkDisplay` that the clipboard belongs to.
|
||||
*/
|
||||
properties[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"Display owning this clipboard",
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -372,9 +370,7 @@ gdk_clipboard_class_init (GdkClipboardClass *class)
|
||||
* The possible formats that the clipboard can provide its data in.
|
||||
*/
|
||||
properties[PROP_FORMATS] =
|
||||
g_param_spec_boxed ("formats",
|
||||
"Formats",
|
||||
"The possible formats for data",
|
||||
g_param_spec_boxed ("formats", NULL, NULL,
|
||||
GDK_TYPE_CONTENT_FORMATS,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
@@ -386,9 +382,7 @@ gdk_clipboard_class_init (GdkClipboardClass *class)
|
||||
* %TRUE if the contents of the clipboard are owned by this process.
|
||||
*/
|
||||
properties[PROP_LOCAL] =
|
||||
g_param_spec_boolean ("local",
|
||||
"Local",
|
||||
"If the contents are owned by this process",
|
||||
g_param_spec_boolean ("local", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
@@ -401,9 +395,7 @@ gdk_clipboard_class_init (GdkClipboardClass *class)
|
||||
* provided otherwise.
|
||||
*/
|
||||
properties[PROP_CONTENT] =
|
||||
g_param_spec_object ("content",
|
||||
"Content",
|
||||
"Provider of the clipboard's content",
|
||||
g_param_spec_object ("content", NULL, NULL,
|
||||
GDK_TYPE_CONTENT_PROVIDER,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
|
||||
@@ -173,9 +173,7 @@ gdk_content_provider_class_init (GdkContentProviderClass *class)
|
||||
* The possible formats that the provider can provide its data in.
|
||||
*/
|
||||
properties[PROP_FORMATS] =
|
||||
g_param_spec_boxed ("formats",
|
||||
"Formats",
|
||||
"The possible formats for data",
|
||||
g_param_spec_boxed ("formats", NULL, NULL,
|
||||
GDK_TYPE_CONTENT_FORMATS,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
@@ -187,9 +185,7 @@ gdk_content_provider_class_init (GdkContentProviderClass *class)
|
||||
* The subset of formats that clipboard managers should store this provider's data in.
|
||||
*/
|
||||
properties[PROP_STORABLE_FORMATS] =
|
||||
g_param_spec_boxed ("storable-formats",
|
||||
"Storable formats",
|
||||
"The formats that data should be stored in",
|
||||
g_param_spec_boxed ("storable-formats", NULL, NULL,
|
||||
GDK_TYPE_CONTENT_FORMATS,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
|
||||
+5
-15
@@ -174,9 +174,7 @@ gdk_cursor_class_init (GdkCursorClass *cursor_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_FALLBACK,
|
||||
g_param_spec_object ("fallback",
|
||||
P_("Fallback"),
|
||||
P_("Cursor image to fall back to if this cursor cannot be displayed"),
|
||||
g_param_spec_object ("fallback", NULL, NULL,
|
||||
GDK_TYPE_CURSOR,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
@@ -188,9 +186,7 @@ gdk_cursor_class_init (GdkCursorClass *cursor_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_HOTSPOT_X,
|
||||
g_param_spec_int ("hotspot-x",
|
||||
P_("Hotspot X"),
|
||||
P_("Horizontal offset of the cursor hotspot"),
|
||||
g_param_spec_int ("hotspot-x", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
@@ -202,9 +198,7 @@ gdk_cursor_class_init (GdkCursorClass *cursor_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_HOTSPOT_Y,
|
||||
g_param_spec_int ("hotspot-y",
|
||||
P_("Hotspot Y"),
|
||||
P_("Vertical offset of the cursor hotspot"),
|
||||
g_param_spec_int ("hotspot-y", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
@@ -218,9 +212,7 @@ gdk_cursor_class_init (GdkCursorClass *cursor_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_NAME,
|
||||
g_param_spec_string ("name",
|
||||
P_("Name"),
|
||||
P_("Name of this cursor"),
|
||||
g_param_spec_string ("name", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
@@ -234,9 +226,7 @@ gdk_cursor_class_init (GdkCursorClass *cursor_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_TEXTURE,
|
||||
g_param_spec_object ("texture",
|
||||
P_("Texture"),
|
||||
P_("The texture displayed by this cursor"),
|
||||
g_param_spec_object ("texture", NULL, NULL,
|
||||
GDK_TYPE_TEXTURE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
+16
-48
@@ -109,9 +109,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* The `GdkDisplay` the `GdkDevice` pertains to.
|
||||
*/
|
||||
device_props[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
P_("Device Display"),
|
||||
P_("Display which the device belongs to"),
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -121,9 +119,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* The device name.
|
||||
*/
|
||||
device_props[PROP_NAME] =
|
||||
g_param_spec_string ("name",
|
||||
P_("Device name"),
|
||||
P_("Device name"),
|
||||
g_param_spec_string ("name", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
@@ -134,9 +130,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* Source type for the device.
|
||||
*/
|
||||
device_props[PROP_SOURCE] =
|
||||
g_param_spec_enum ("source",
|
||||
P_("Input source"),
|
||||
P_("Source type for the device"),
|
||||
g_param_spec_enum ("source", NULL, NULL,
|
||||
GDK_TYPE_INPUT_SOURCE,
|
||||
GDK_SOURCE_MOUSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -148,9 +142,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* Whether the device is represented by a cursor on the screen.
|
||||
*/
|
||||
device_props[PROP_HAS_CURSOR] =
|
||||
g_param_spec_boolean ("has-cursor",
|
||||
P_("Whether the device has a cursor"),
|
||||
P_("Whether there is a visible cursor following device motion"),
|
||||
g_param_spec_boolean ("has-cursor", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
@@ -161,9 +153,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* Number of axes in the device.
|
||||
*/
|
||||
device_props[PROP_N_AXES] =
|
||||
g_param_spec_uint ("n-axes",
|
||||
P_("Number of axes in the device"),
|
||||
P_("Number of axes in the device"),
|
||||
g_param_spec_uint ("n-axes", NULL, NULL,
|
||||
0, G_MAXUINT,
|
||||
0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
@@ -176,9 +166,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* See [method@Gdk.Device.get_vendor_id].
|
||||
*/
|
||||
device_props[PROP_VENDOR_ID] =
|
||||
g_param_spec_string ("vendor-id",
|
||||
P_("Vendor ID"),
|
||||
P_("Vendor ID"),
|
||||
g_param_spec_string ("vendor-id", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
@@ -191,9 +179,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* See [method@Gdk.Device.get_product_id].
|
||||
*/
|
||||
device_props[PROP_PRODUCT_ID] =
|
||||
g_param_spec_string ("product-id",
|
||||
P_("Product ID"),
|
||||
P_("Product ID"),
|
||||
g_param_spec_string ("product-id", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
@@ -204,9 +190,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* `GdkSeat` of this device.
|
||||
*/
|
||||
device_props[PROP_SEAT] =
|
||||
g_param_spec_object ("seat",
|
||||
P_("Seat"),
|
||||
P_("Seat"),
|
||||
g_param_spec_object ("seat", NULL, NULL,
|
||||
GDK_TYPE_SEAT,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
@@ -220,9 +204,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* of touches is unknown.
|
||||
*/
|
||||
device_props[PROP_NUM_TOUCHES] =
|
||||
g_param_spec_uint ("num-touches",
|
||||
P_("Number of concurrent touches"),
|
||||
P_("Number of concurrent touches"),
|
||||
g_param_spec_uint ("num-touches", NULL, NULL,
|
||||
0, G_MAXUINT,
|
||||
0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -234,9 +216,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* The `GdkDeviceTool` that is currently used with this device.
|
||||
*/
|
||||
device_props[PROP_TOOL] =
|
||||
g_param_spec_object ("tool",
|
||||
P_("Tool"),
|
||||
P_("The tool that is currently used with this device"),
|
||||
g_param_spec_object ("tool", NULL, NULL,
|
||||
GDK_TYPE_DEVICE_TOOL,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -248,9 +228,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* This is only relevant for keyboard devices.
|
||||
*/
|
||||
device_props[PROP_DIRECTION] =
|
||||
g_param_spec_enum ("direction",
|
||||
P_("Direction"),
|
||||
P_("The direction of the current layout of the keyboard"),
|
||||
g_param_spec_enum ("direction", NULL, NULL,
|
||||
PANGO_TYPE_DIRECTION, PANGO_DIRECTION_NEUTRAL,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -262,9 +240,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* This is only relevant for keyboard devices.
|
||||
*/
|
||||
device_props[PROP_HAS_BIDI_LAYOUTS] =
|
||||
g_param_spec_boolean ("has-bidi-layouts",
|
||||
P_("Has bidi layouts"),
|
||||
P_("Whether the keyboard has bidi layouts"),
|
||||
g_param_spec_boolean ("has-bidi-layouts", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -276,9 +252,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* This is only relevant for keyboard devices.
|
||||
*/
|
||||
device_props[PROP_CAPS_LOCK_STATE] =
|
||||
g_param_spec_boolean ("caps-lock-state",
|
||||
P_("Caps lock state"),
|
||||
P_("Whether the keyboard caps lock is on"),
|
||||
g_param_spec_boolean ("caps-lock-state", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -290,9 +264,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* This is only relevant for keyboard devices.
|
||||
*/
|
||||
device_props[PROP_NUM_LOCK_STATE] =
|
||||
g_param_spec_boolean ("num-lock-state",
|
||||
P_("Num lock state"),
|
||||
P_("Whether the keyboard num lock is on"),
|
||||
g_param_spec_boolean ("num-lock-state", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -304,9 +276,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* This is only relevant for keyboard devices.
|
||||
*/
|
||||
device_props[PROP_SCROLL_LOCK_STATE] =
|
||||
g_param_spec_boolean ("scroll-lock-state",
|
||||
P_("Scroll lock state"),
|
||||
P_("Whether the keyboard scroll lock is on"),
|
||||
g_param_spec_boolean ("scroll-lock-state", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -318,9 +288,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
|
||||
* This is only relevant for keyboard devices.
|
||||
*/
|
||||
device_props[PROP_MODIFIER_STATE] =
|
||||
g_param_spec_flags ("modifier-state",
|
||||
P_("Modifier state"),
|
||||
P_("The modifier state of the keyboard"),
|
||||
g_param_spec_flags ("modifier-state", NULL, NULL,
|
||||
GDK_TYPE_MODIFIER_TYPE, 0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
+4
-12
@@ -111,9 +111,7 @@ gdk_device_tool_class_init (GdkDeviceToolClass *klass)
|
||||
*
|
||||
* The serial number of the tool.
|
||||
*/
|
||||
tool_props[TOOL_PROP_SERIAL] = g_param_spec_uint64 ("serial",
|
||||
"Serial",
|
||||
"Serial number",
|
||||
tool_props[TOOL_PROP_SERIAL] = g_param_spec_uint64 ("serial", NULL, NULL,
|
||||
0, G_MAXUINT64, 0,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -124,9 +122,7 @@ gdk_device_tool_class_init (GdkDeviceToolClass *klass)
|
||||
*
|
||||
* The type of the tool.
|
||||
*/
|
||||
tool_props[TOOL_PROP_TOOL_TYPE] = g_param_spec_enum ("tool-type",
|
||||
"Tool type",
|
||||
"Tool type",
|
||||
tool_props[TOOL_PROP_TOOL_TYPE] = g_param_spec_enum ("tool-type", NULL, NULL,
|
||||
GDK_TYPE_DEVICE_TOOL_TYPE,
|
||||
GDK_DEVICE_TOOL_TYPE_UNKNOWN,
|
||||
G_PARAM_READWRITE |
|
||||
@@ -138,9 +134,7 @@ gdk_device_tool_class_init (GdkDeviceToolClass *klass)
|
||||
*
|
||||
* The axes of the tool.
|
||||
*/
|
||||
tool_props[TOOL_PROP_AXES] = g_param_spec_flags ("axes",
|
||||
"Axes",
|
||||
"Tool axes",
|
||||
tool_props[TOOL_PROP_AXES] = g_param_spec_flags ("axes", NULL, NULL,
|
||||
GDK_TYPE_AXIS_FLAGS, 0,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY);
|
||||
@@ -150,9 +144,7 @@ gdk_device_tool_class_init (GdkDeviceToolClass *klass)
|
||||
*
|
||||
* The hardware ID of the tool.
|
||||
*/
|
||||
tool_props[TOOL_PROP_HARDWARE_ID] = g_param_spec_uint64 ("hardware-id",
|
||||
"Hardware ID",
|
||||
"Hardware ID",
|
||||
tool_props[TOOL_PROP_HARDWARE_ID] = g_param_spec_uint64 ("hardware-id", NULL, NULL,
|
||||
0, G_MAXUINT64, 0,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
|
||||
+6
-12
@@ -213,9 +213,7 @@ gdk_display_class_init (GdkDisplayClass *class)
|
||||
* %TRUE if the display properly composites the alpha channel.
|
||||
*/
|
||||
props[PROP_COMPOSITED] =
|
||||
g_param_spec_boolean ("composited",
|
||||
P_("Composited"),
|
||||
P_("Composited"),
|
||||
g_param_spec_boolean ("composited", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -225,9 +223,7 @@ gdk_display_class_init (GdkDisplayClass *class)
|
||||
* %TRUE if the display supports an alpha channel.
|
||||
*/
|
||||
props[PROP_RGBA] =
|
||||
g_param_spec_boolean ("rgba",
|
||||
P_("RGBA"),
|
||||
P_("RGBA"),
|
||||
g_param_spec_boolean ("rgba", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -237,9 +233,7 @@ gdk_display_class_init (GdkDisplayClass *class)
|
||||
* %TRUE if the display supports input shapes.
|
||||
*/
|
||||
props[PROP_INPUT_SHAPES] =
|
||||
g_param_spec_boolean ("input-shapes",
|
||||
P_("Input shapes"),
|
||||
P_("Input shapes"),
|
||||
g_param_spec_boolean ("input-shapes", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -1628,10 +1622,10 @@ gdk_display_check_egl_extensions (EGLDisplay egl_display,
|
||||
/* translators: Arguments are the number of missing extensions
|
||||
* followed by a comma-separated list of their names */
|
||||
g_dngettext (GETTEXT_PACKAGE,
|
||||
"EGL implementation is missing extension %2$s",
|
||||
"EGL implementation is missing %d extensions: %s",
|
||||
"EGL implementation is missing extension %s",
|
||||
"EGL implementation is missing %2$d extensions: %1$s",
|
||||
n_missing),
|
||||
(int) n_missing, missing->str);
|
||||
missing->str, (int) n_missing);
|
||||
|
||||
g_string_free (missing, TRUE);
|
||||
return FALSE;
|
||||
|
||||
@@ -155,9 +155,7 @@ gdk_display_manager_class_init (GdkDisplayManagerClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DEFAULT_DISPLAY,
|
||||
g_param_spec_object ("default-display",
|
||||
P_("Default Display"),
|
||||
P_("The default display for GDK"),
|
||||
g_param_spec_object ("default-display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
|
||||
}
|
||||
|
||||
+7
-21
@@ -379,9 +379,7 @@ gdk_drag_class_init (GdkDragClass *klass)
|
||||
* The `GdkContentProvider`.
|
||||
*/
|
||||
properties[PROP_CONTENT] =
|
||||
g_param_spec_object ("content",
|
||||
"Content",
|
||||
"The content being dragged",
|
||||
g_param_spec_object ("content", NULL, NULL,
|
||||
GDK_TYPE_CONTENT_PROVIDER,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -394,9 +392,7 @@ gdk_drag_class_init (GdkDragClass *klass)
|
||||
* The `GdkDevice` that is performing the drag.
|
||||
*/
|
||||
properties[PROP_DEVICE] =
|
||||
g_param_spec_object ("device",
|
||||
"Device",
|
||||
"The device performing the drag",
|
||||
g_param_spec_object ("device", NULL, NULL,
|
||||
GDK_TYPE_DEVICE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -409,9 +405,7 @@ gdk_drag_class_init (GdkDragClass *klass)
|
||||
* The `GdkDisplay` that the drag belongs to.
|
||||
*/
|
||||
properties[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"Display this drag belongs to",
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
@@ -423,9 +417,7 @@ gdk_drag_class_init (GdkDragClass *klass)
|
||||
* The possible formats that the drag can provide its data in.
|
||||
*/
|
||||
properties[PROP_FORMATS] =
|
||||
g_param_spec_boxed ("formats",
|
||||
"Formats",
|
||||
"The possible formats for data",
|
||||
g_param_spec_boxed ("formats", NULL, NULL,
|
||||
GDK_TYPE_CONTENT_FORMATS,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -438,9 +430,7 @@ gdk_drag_class_init (GdkDragClass *klass)
|
||||
* The currently selected action of the drag.
|
||||
*/
|
||||
properties[PROP_SELECTED_ACTION] =
|
||||
g_param_spec_flags ("selected-action",
|
||||
"Selected action",
|
||||
"The currently selected action",
|
||||
g_param_spec_flags ("selected-action", NULL, NULL,
|
||||
GDK_TYPE_DRAG_ACTION,
|
||||
0,
|
||||
G_PARAM_READWRITE |
|
||||
@@ -453,9 +443,7 @@ gdk_drag_class_init (GdkDragClass *klass)
|
||||
* The possible actions of this drag.
|
||||
*/
|
||||
properties[PROP_ACTIONS] =
|
||||
g_param_spec_flags ("actions",
|
||||
"Actions",
|
||||
"The possible actions",
|
||||
g_param_spec_flags ("actions", NULL, NULL,
|
||||
GDK_TYPE_DRAG_ACTION,
|
||||
0,
|
||||
G_PARAM_READWRITE |
|
||||
@@ -468,9 +456,7 @@ gdk_drag_class_init (GdkDragClass *klass)
|
||||
* The surface where the drag originates.
|
||||
*/
|
||||
properties[PROP_SURFACE] =
|
||||
g_param_spec_object ("surface",
|
||||
"Surface",
|
||||
"The surface where the drag originates",
|
||||
g_param_spec_object ("surface", NULL, NULL,
|
||||
GDK_TYPE_SURFACE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
|
||||
@@ -168,9 +168,7 @@ gdk_draw_context_class_init (GdkDrawContextClass *klass)
|
||||
* The `GdkDisplay` used to create the `GdkDrawContext`.
|
||||
*/
|
||||
pspecs[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
P_("Display"),
|
||||
P_("The GDK display used to create the context"),
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -182,9 +180,7 @@ gdk_draw_context_class_init (GdkDrawContextClass *klass)
|
||||
* The `GdkSurface` the context is bound to.
|
||||
*/
|
||||
pspecs[PROP_SURFACE] =
|
||||
g_param_spec_object ("surface",
|
||||
P_("Surface"),
|
||||
P_("The GDK surface bound to the context"),
|
||||
g_param_spec_object ("surface", NULL, NULL,
|
||||
GDK_TYPE_SURFACE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
|
||||
+6
-18
@@ -325,9 +325,7 @@ gdk_drop_class_init (GdkDropClass *klass)
|
||||
* The possible actions for this drop
|
||||
*/
|
||||
properties[PROP_ACTIONS] =
|
||||
g_param_spec_flags ("actions",
|
||||
"Actions",
|
||||
"The possible actions for this drop",
|
||||
g_param_spec_flags ("actions", NULL, NULL,
|
||||
GDK_TYPE_DRAG_ACTION,
|
||||
GDK_ACTION_ALL,
|
||||
G_PARAM_READWRITE |
|
||||
@@ -341,9 +339,7 @@ gdk_drop_class_init (GdkDropClass *klass)
|
||||
* The `GdkDevice` performing the drop
|
||||
*/
|
||||
properties[PROP_DEVICE] =
|
||||
g_param_spec_object ("device",
|
||||
"Device",
|
||||
"The device performing the drop",
|
||||
g_param_spec_object ("device", NULL, NULL,
|
||||
GDK_TYPE_DEVICE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -356,9 +352,7 @@ gdk_drop_class_init (GdkDropClass *klass)
|
||||
* The `GdkDisplay` that the drop belongs to.
|
||||
*/
|
||||
properties[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"Display this drag belongs to",
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
@@ -370,9 +364,7 @@ gdk_drop_class_init (GdkDropClass *klass)
|
||||
* The `GdkDrag` that initiated this drop
|
||||
*/
|
||||
properties[PROP_DRAG] =
|
||||
g_param_spec_object ("drag",
|
||||
"Drag",
|
||||
"The drag that initiated this drop",
|
||||
g_param_spec_object ("drag", NULL, NULL,
|
||||
GDK_TYPE_DRAG,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -385,9 +377,7 @@ gdk_drop_class_init (GdkDropClass *klass)
|
||||
* The possible formats that the drop can provide its data in.
|
||||
*/
|
||||
properties[PROP_FORMATS] =
|
||||
g_param_spec_boxed ("formats",
|
||||
"Formats",
|
||||
"The possible formats for data",
|
||||
g_param_spec_boxed ("formats", NULL, NULL,
|
||||
GDK_TYPE_CONTENT_FORMATS,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -400,9 +390,7 @@ gdk_drop_class_init (GdkDropClass *klass)
|
||||
* The `GdkSurface` the drop happens on
|
||||
*/
|
||||
properties[PROP_SURFACE] =
|
||||
g_param_spec_object ("surface",
|
||||
"Surface",
|
||||
"The surface the drop is happening on",
|
||||
g_param_spec_object ("surface", NULL, NULL,
|
||||
GDK_TYPE_SURFACE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
|
||||
+3
-9
@@ -690,9 +690,7 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
|
||||
* can be shared.
|
||||
*/
|
||||
properties[PROP_SHARED_CONTEXT] =
|
||||
g_param_spec_object ("shared-context",
|
||||
P_("Shared context"),
|
||||
P_("The GL context this context shares data with"),
|
||||
g_param_spec_object ("shared-context", NULL, NULL,
|
||||
GDK_TYPE_GL_CONTEXT,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -707,9 +705,7 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
|
||||
* Since: 4.6
|
||||
*/
|
||||
properties[PROP_ALLOWED_APIS] =
|
||||
g_param_spec_flags ("allowed-apis",
|
||||
P_("Allowed APIs"),
|
||||
P_("The list of allowed APIs for this context"),
|
||||
g_param_spec_flags ("allowed-apis", NULL, NULL,
|
||||
GDK_TYPE_GL_API,
|
||||
DEFAULT_ALLOWED_APIS,
|
||||
G_PARAM_READWRITE |
|
||||
@@ -724,9 +720,7 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
|
||||
* Since: 4.6
|
||||
*/
|
||||
properties[PROP_API] =
|
||||
g_param_spec_flags ("api",
|
||||
P_("API"),
|
||||
P_("The API currently in use"),
|
||||
g_param_spec_flags ("api", NULL, NULL,
|
||||
GDK_TYPE_GL_API,
|
||||
0,
|
||||
G_PARAM_READABLE |
|
||||
|
||||
@@ -27,6 +27,4 @@
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#define P_(String) dgettext (GETTEXT_PACKAGE "-properties", String)
|
||||
|
||||
#endif
|
||||
|
||||
+1
-3
@@ -123,9 +123,7 @@ gdk_keymap_class_init (GdkKeymapClass *klass)
|
||||
klass->keys_changed = gdk_keymap_keys_changed;
|
||||
|
||||
props[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"The display of the keymap",
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
@@ -178,19 +178,19 @@ gdk_memory_texture_new_subtexture (GdkMemoryTexture *source,
|
||||
GBytes *bytes;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_MEMORY_TEXTURE (source), NULL);
|
||||
g_return_val_if_fail (x < 0 || x >= GDK_TEXTURE (source)->width, NULL);
|
||||
g_return_val_if_fail (y < 0 || y >= GDK_TEXTURE (source)->height, NULL);
|
||||
g_return_val_if_fail (width <= 0 || x + width > GDK_TEXTURE (source)->width, NULL);
|
||||
g_return_val_if_fail (height <= 0 || y + height > GDK_TEXTURE (source)->height, NULL);
|
||||
g_return_val_if_fail (x >= 0 || x < GDK_TEXTURE (source)->width, NULL);
|
||||
g_return_val_if_fail (y >= 0 || y < GDK_TEXTURE (source)->height, NULL);
|
||||
g_return_val_if_fail (width > 0 || x + width <= GDK_TEXTURE (source)->width, NULL);
|
||||
g_return_val_if_fail (height > 0 || y + height <= GDK_TEXTURE (source)->height, NULL);
|
||||
|
||||
texture = GDK_TEXTURE (source);
|
||||
bpp = gdk_memory_format_bytes_per_pixel (texture->format);
|
||||
offset = y * source->stride + x * bpp;
|
||||
size = source->stride * (height - 1) + x * bpp;
|
||||
size = source->stride * (height - 1) + width * bpp;
|
||||
bytes = g_bytes_new_from_bytes (source->bytes, offset, size);
|
||||
|
||||
result = gdk_memory_texture_new (texture->width,
|
||||
texture->height,
|
||||
result = gdk_memory_texture_new (width,
|
||||
height,
|
||||
texture->format,
|
||||
bytes,
|
||||
source->stride);
|
||||
|
||||
+11
-33
@@ -176,9 +176,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The `GdkDisplay` of the monitor.
|
||||
*/
|
||||
props[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"The display of the monitor",
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -188,9 +186,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The manufacturer name.
|
||||
*/
|
||||
props[PROP_MANUFACTURER] =
|
||||
g_param_spec_string ("manufacturer",
|
||||
"Manufacturer",
|
||||
"The manufacturer name",
|
||||
g_param_spec_string ("manufacturer", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -200,9 +196,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The model name.
|
||||
*/
|
||||
props[PROP_MODEL] =
|
||||
g_param_spec_string ("model",
|
||||
"Model",
|
||||
"The model name",
|
||||
g_param_spec_string ("model", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -212,9 +206,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The connector name.
|
||||
*/
|
||||
props[PROP_CONNECTOR] =
|
||||
g_param_spec_string ("connector",
|
||||
"Connector",
|
||||
"The connector name",
|
||||
g_param_spec_string ("connector", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -224,9 +216,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The scale factor.
|
||||
*/
|
||||
props[PROP_SCALE_FACTOR] =
|
||||
g_param_spec_int ("scale-factor",
|
||||
"Scale factor",
|
||||
"The scale factor",
|
||||
g_param_spec_int ("scale-factor", NULL, NULL,
|
||||
0, G_MAXINT,
|
||||
1,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
@@ -237,9 +227,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The geometry of the monitor.
|
||||
*/
|
||||
props[PROP_GEOMETRY] =
|
||||
g_param_spec_boxed ("geometry",
|
||||
"Geometry",
|
||||
"The geometry of the monitor",
|
||||
g_param_spec_boxed ("geometry", NULL, NULL,
|
||||
GDK_TYPE_RECTANGLE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -249,9 +237,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The width of the monitor, in millimeters.
|
||||
*/
|
||||
props[PROP_WIDTH_MM] =
|
||||
g_param_spec_int ("width-mm",
|
||||
"Physical width",
|
||||
"The width of the monitor, in millimeters",
|
||||
g_param_spec_int ("width-mm", NULL, NULL,
|
||||
0, G_MAXINT,
|
||||
0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
@@ -262,9 +248,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The height of the monitor, in millimeters.
|
||||
*/
|
||||
props[PROP_HEIGHT_MM] =
|
||||
g_param_spec_int ("height-mm",
|
||||
"Physical height",
|
||||
"The height of the monitor, in millimeters",
|
||||
g_param_spec_int ("height-mm", NULL, NULL,
|
||||
0, G_MAXINT,
|
||||
0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
@@ -275,9 +259,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The refresh rate, in milli-Hertz.
|
||||
*/
|
||||
props[PROP_REFRESH_RATE] =
|
||||
g_param_spec_int ("refresh-rate",
|
||||
"Refresh rate",
|
||||
"The refresh rate, in millihertz",
|
||||
g_param_spec_int ("refresh-rate", NULL, NULL,
|
||||
0, G_MAXINT,
|
||||
0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
@@ -288,9 +270,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* The subpixel layout.
|
||||
*/
|
||||
props[PROP_SUBPIXEL_LAYOUT] =
|
||||
g_param_spec_enum ("subpixel-layout",
|
||||
"Subpixel layout",
|
||||
"The subpixel layout",
|
||||
g_param_spec_enum ("subpixel-layout", NULL, NULL,
|
||||
GDK_TYPE_SUBPIXEL_LAYOUT,
|
||||
GDK_SUBPIXEL_LAYOUT_UNKNOWN,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
@@ -301,9 +281,7 @@ gdk_monitor_class_init (GdkMonitorClass *class)
|
||||
* Whether the object is still valid.
|
||||
*/
|
||||
props[PROP_VALID] =
|
||||
g_param_spec_boolean ("valid",
|
||||
"Valid",
|
||||
"Whether the monitor is still valid",
|
||||
g_param_spec_boolean ("valid", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
+2
-6
@@ -85,9 +85,7 @@ gdk_popup_default_init (GdkPopupInterface *iface)
|
||||
* The parent surface.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_object ("parent",
|
||||
P_("Parent"),
|
||||
P_("The parent surface"),
|
||||
g_param_spec_object ("parent", NULL, NULL,
|
||||
GDK_TYPE_SURFACE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
@@ -97,9 +95,7 @@ gdk_popup_default_init (GdkPopupInterface *iface)
|
||||
* Whether to hide on outside clicks.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_boolean ("autohide",
|
||||
P_("Autohide"),
|
||||
P_("Whether to hide on outside clicks"),
|
||||
g_param_spec_boolean ("autohide", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
}
|
||||
|
||||
+1
-3
@@ -184,9 +184,7 @@ gdk_seat_class_init (GdkSeatClass *klass)
|
||||
* `GdkDisplay` of this seat.
|
||||
*/
|
||||
props[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
P_("Display"),
|
||||
P_("Display"),
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
|
||||
+7
-21
@@ -506,9 +506,7 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
|
||||
* The mouse pointer for the `GdkSurface`.
|
||||
*/
|
||||
properties[PROP_CURSOR] =
|
||||
g_param_spec_object ("cursor",
|
||||
P_("Cursor"),
|
||||
P_("Cursor"),
|
||||
g_param_spec_object ("cursor", NULL, NULL,
|
||||
GDK_TYPE_CURSOR,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -518,9 +516,7 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
|
||||
* The `GdkDisplay` connection of the surface.
|
||||
*/
|
||||
properties[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
P_("Display"),
|
||||
P_("Display"),
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -530,9 +526,7 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
|
||||
* The `GdkFrameClock` of the surface.
|
||||
*/
|
||||
properties[PROP_FRAME_CLOCK] =
|
||||
g_param_spec_object ("frame-clock",
|
||||
P_("Frame Clock"),
|
||||
P_("Frame Clock"),
|
||||
g_param_spec_object ("frame-clock", NULL, NULL,
|
||||
GDK_TYPE_FRAME_CLOCK,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -542,9 +536,7 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
|
||||
* Whether the surface is mapped.
|
||||
*/
|
||||
properties[PROP_MAPPED] =
|
||||
g_param_spec_boolean ("mapped",
|
||||
P_("Mapped"),
|
||||
P_("Mapped"),
|
||||
g_param_spec_boolean ("mapped", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -554,9 +546,7 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
|
||||
* The width of the surface in pixels.
|
||||
*/
|
||||
properties[PROP_WIDTH] =
|
||||
g_param_spec_int ("width",
|
||||
P_("Width"),
|
||||
P_("Width"),
|
||||
g_param_spec_int ("width", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -566,9 +556,7 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
|
||||
* The height of the surface, in pixels.
|
||||
*/
|
||||
properties[PROP_HEIGHT] =
|
||||
g_param_spec_int ("height",
|
||||
P_("Height"),
|
||||
P_("Height"),
|
||||
g_param_spec_int ("height", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -578,9 +566,7 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
|
||||
* The scale factor of the surface.
|
||||
*/
|
||||
properties[PROP_SCALE_FACTOR] =
|
||||
g_param_spec_int ("scale-factor",
|
||||
P_("Scale factor"),
|
||||
P_("Scale factor"),
|
||||
g_param_spec_int ("scale-factor", NULL, NULL,
|
||||
1, G_MAXINT, 1,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
+2
-6
@@ -304,9 +304,7 @@ gdk_texture_class_init (GdkTextureClass *klass)
|
||||
* The width of the texture, in pixels.
|
||||
*/
|
||||
properties[PROP_WIDTH] =
|
||||
g_param_spec_int ("width",
|
||||
"Width",
|
||||
"The width of the texture",
|
||||
g_param_spec_int ("width", NULL, NULL,
|
||||
1,
|
||||
G_MAXINT,
|
||||
1,
|
||||
@@ -321,9 +319,7 @@ gdk_texture_class_init (GdkTextureClass *klass)
|
||||
* The height of the texture, in pixels.
|
||||
*/
|
||||
properties[PROP_HEIGHT] =
|
||||
g_param_spec_int ("height",
|
||||
"Height",
|
||||
"The height of the texture",
|
||||
g_param_spec_int ("height", NULL, NULL,
|
||||
1,
|
||||
G_MAXINT,
|
||||
1,
|
||||
|
||||
+10
-30
@@ -131,9 +131,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* The state of the toplevel.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_flags ("state",
|
||||
P_("State"),
|
||||
P_("State"),
|
||||
g_param_spec_flags ("state", NULL, NULL,
|
||||
GDK_TYPE_TOPLEVEL_STATE, 0,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
@@ -143,9 +141,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* The title of the surface.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_string ("title",
|
||||
"Title",
|
||||
"The title of the surface",
|
||||
g_param_spec_string ("title", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -158,9 +154,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* startup feedback.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_string ("startup-id",
|
||||
"Startup ID",
|
||||
"The startup ID of the surface",
|
||||
g_param_spec_string ("startup-id", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -170,9 +164,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* The transient parent of the surface.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_object ("transient-for",
|
||||
"Transient For",
|
||||
"The transient parent of the surface",
|
||||
g_param_spec_object ("transient-for", NULL, NULL,
|
||||
GDK_TYPE_SURFACE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -182,9 +174,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* Whether the surface is modal.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_boolean ("modal",
|
||||
"Modal",
|
||||
"Whether the surface is modal",
|
||||
g_param_spec_boolean ("modal", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -194,9 +184,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* A list of textures to use as icon.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_pointer ("icon-list",
|
||||
"Icon List",
|
||||
"The list of icon textures",
|
||||
g_param_spec_pointer ("icon-list", NULL, NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
/**
|
||||
@@ -205,9 +193,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* Whether the window manager should add decorations.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_boolean ("decorated",
|
||||
"Decorated",
|
||||
"Decorated",
|
||||
g_param_spec_boolean ("decorated", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -217,9 +203,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* Whether the window manager should allow to close the surface.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_boolean ("deletable",
|
||||
"Deletable",
|
||||
"Deletable",
|
||||
g_param_spec_boolean ("deletable", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -229,9 +213,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* The fullscreen mode of the surface.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_enum ("fullscreen-mode",
|
||||
"Fullscreen mode",
|
||||
"Fullscreen mode",
|
||||
g_param_spec_enum ("fullscreen-mode", NULL, NULL,
|
||||
GDK_TYPE_FULLSCREEN_MODE,
|
||||
GDK_FULLSCREEN_ON_CURRENT_MONITOR,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
@@ -242,9 +224,7 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
* Whether the surface should inhibit keyboard shortcuts.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_boolean ("shortcuts-inhibited",
|
||||
"Shortcuts inhibited",
|
||||
"Whether keyboard shortcuts are inhibited",
|
||||
g_param_spec_boolean ("shortcuts-inhibited", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
@@ -601,9 +601,7 @@ gdk_macos_drag_class_init (GdkMacosDragClass *klass)
|
||||
drag_class->handle_event = gdk_macos_drag_handle_event;
|
||||
|
||||
properties [PROP_DRAG_SURFACE] =
|
||||
g_param_spec_object ("drag-surface",
|
||||
P_("Drag Surface"),
|
||||
P_("Drag Surface"),
|
||||
g_param_spec_object ("drag-surface", NULL, NULL,
|
||||
GDK_TYPE_MACOS_DRAG_SURFACE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
@@ -602,9 +602,7 @@ gdk_macos_surface_class_init (GdkMacosSurfaceClass *klass)
|
||||
* The "native" property contains the underlying NSWindow.
|
||||
*/
|
||||
properties [PROP_NATIVE] =
|
||||
g_param_spec_pointer ("native",
|
||||
"Native",
|
||||
"The native NSWindow",
|
||||
g_param_spec_pointer ("native", NULL, NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (object_class, LAST_PROP, properties);
|
||||
|
||||
@@ -113,6 +113,7 @@ struct _GdkWaylandSurface
|
||||
|
||||
PopupState popup_state;
|
||||
|
||||
unsigned int popup_thaw_upon_show : 1;
|
||||
unsigned int initial_configure_received : 1;
|
||||
unsigned int has_uncommitted_ack_configure : 1;
|
||||
unsigned int mapped : 1;
|
||||
@@ -2984,6 +2985,9 @@ gdk_wayland_surface_hide_surface (GdkSurface *surface)
|
||||
|
||||
if (GDK_IS_POPUP (surface))
|
||||
{
|
||||
impl->popup_thaw_upon_show = TRUE;
|
||||
gdk_surface_freeze_updates (surface);
|
||||
|
||||
switch (impl->popup_state)
|
||||
{
|
||||
case POPUP_STATE_WAITING_FOR_REPOSITIONED:
|
||||
@@ -3223,6 +3227,12 @@ show_popup (GdkSurface *surface,
|
||||
if (!impl->display_server.wl_surface)
|
||||
gdk_wayland_surface_create_surface (surface);
|
||||
|
||||
if (impl->popup_thaw_upon_show)
|
||||
{
|
||||
impl->popup_thaw_upon_show = FALSE;
|
||||
gdk_surface_thaw_updates (surface);
|
||||
}
|
||||
|
||||
gdk_wayland_surface_map_popup (surface, width, height, layout);
|
||||
}
|
||||
|
||||
|
||||
@@ -231,22 +231,16 @@ gdk_win32_hcursor_class_init (GdkWin32HCursorClass *klass)
|
||||
object_class->set_property = gdk_win32_hcursor_set_property;
|
||||
|
||||
hcursor_props[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
P_("Display"),
|
||||
P_("The display that will use this cursor"),
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
|
||||
|
||||
hcursor_props[PROP_HANDLE] =
|
||||
g_param_spec_pointer ("handle",
|
||||
P_("Handle"),
|
||||
P_("The HCURSOR handle for this cursor"),
|
||||
g_param_spec_pointer ("handle", NULL, NULL,
|
||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
|
||||
|
||||
hcursor_props[PROP_DESTROYABLE] =
|
||||
g_param_spec_boolean ("destroyable",
|
||||
P_("Destroyable"),
|
||||
P_("Whether calling DestroyCursor() is allowed on this cursor"),
|
||||
g_param_spec_boolean ("destroyable", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#include "gdkdeviceprivate.h"
|
||||
#include "gdkdevice-virtual.h"
|
||||
#include "gdkdevice-wintab.h"
|
||||
#include "gdkinput-dmanipulation.h"
|
||||
#include "gdkinput-winpointer.h"
|
||||
#include "gdkwin32dnd.h"
|
||||
#include "gdkwin32dnd-private.h"
|
||||
@@ -2656,6 +2657,13 @@ gdk_event_translate (MSG *msg,
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
||||
case DM_POINTERHITTEST:
|
||||
gdk_dmanipulation_maybe_add_contact (window, msg);
|
||||
|
||||
*ret_valp = 0;
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
||||
case WM_MOUSEWHEEL:
|
||||
case WM_MOUSEHWHEEL:
|
||||
{
|
||||
@@ -3156,6 +3164,8 @@ gdk_event_translate (MSG *msg,
|
||||
if (win32_display->tablet_input_api == GDK_WIN32_TABLET_INPUT_API_WINPOINTER)
|
||||
gdk_winpointer_finalize_surface (window);
|
||||
|
||||
gdk_dmanipulation_finalize_surface (window);
|
||||
|
||||
return_val = FALSE;
|
||||
break;
|
||||
|
||||
|
||||
@@ -0,0 +1,586 @@
|
||||
/* gdkinput-dmanipulation.c
|
||||
*
|
||||
* Copyright © 2022 the GTK team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
/* {{{ */
|
||||
|
||||
#ifdef WINVER
|
||||
#undef WINVER
|
||||
#endif
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define WINVER 0x0603
|
||||
#define _WIN32_WINNT 0x0603
|
||||
#define COBJMACROS
|
||||
#include "config.h"
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include "gdkwin32.h"
|
||||
#include "gdkprivate-win32.h"
|
||||
#include "gdkdevicemanager-win32.h"
|
||||
#include "gdkdevice-virtual.h"
|
||||
#include "gdkdeviceprivate.h"
|
||||
#include "gdkdisplayprivate.h"
|
||||
#include "gdkeventsprivate.h"
|
||||
#include "gdkseatdefaultprivate.h"
|
||||
#include "gdkinput-dmanipulation.h"
|
||||
#include "winpointer.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <directmanipulation.h>
|
||||
|
||||
typedef BOOL
|
||||
(WINAPI *getPointerType_t)(UINT32 pointerId, POINTER_INPUT_TYPE *pointerType);
|
||||
static getPointerType_t getPointerType;
|
||||
|
||||
static IDirectManipulationManager *dmanipulation_manager;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
IDirectManipulationViewportEventHandlerVtbl *vtable;
|
||||
LONG reference_count;
|
||||
|
||||
enum {
|
||||
GESTURE_PAN,
|
||||
GESTURE_ZOOM,
|
||||
} gesture;
|
||||
|
||||
GdkTouchpadGesturePhase phase;
|
||||
gpointer sequence;
|
||||
|
||||
float scale;
|
||||
float pan_x;
|
||||
float pan_y;
|
||||
|
||||
GdkSurface *surface;
|
||||
GdkDevice *device;
|
||||
}
|
||||
DManipEventHandler;
|
||||
|
||||
static void dmanip_event_handler_running_state_clear (DManipEventHandler *handler);
|
||||
static void dmanip_event_handler_free (DManipEventHandler *handler);
|
||||
|
||||
static void reset_viewport (IDirectManipulationViewport *viewport);
|
||||
|
||||
static gpointer util_get_next_sequence (void);
|
||||
static GdkModifierType util_get_modifier_state (void);
|
||||
static gboolean util_handler_free (gpointer);
|
||||
|
||||
/* }}} */
|
||||
/* {{{ ViewportEventHandler */
|
||||
|
||||
static STDMETHODIMP_ (ULONG)
|
||||
DManipEventHandler_AddRef (IDirectManipulationViewportEventHandler *self_)
|
||||
{
|
||||
DManipEventHandler *self = (DManipEventHandler*) self_;
|
||||
|
||||
return (ULONG) InterlockedIncrement (&self->reference_count);
|
||||
}
|
||||
|
||||
static STDMETHODIMP_ (ULONG)
|
||||
DManipEventHandler_Release (IDirectManipulationViewportEventHandler *self_)
|
||||
{
|
||||
DManipEventHandler *self = (DManipEventHandler*) self_;
|
||||
|
||||
/* NOTE: This may run from a worker thread */
|
||||
|
||||
LONG new_reference_count = InterlockedDecrement (&self->reference_count);
|
||||
|
||||
if (new_reference_count <= 0)
|
||||
{
|
||||
/* For safety, schedule the cleanup to be executed
|
||||
* on the main thread */
|
||||
g_idle_add (util_handler_free, self);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (ULONG) new_reference_count;
|
||||
}
|
||||
|
||||
static STDMETHODIMP
|
||||
DManipEventHandler_QueryInterface (IDirectManipulationViewportEventHandler *self_,
|
||||
REFIID riid,
|
||||
void **ppvObject)
|
||||
{
|
||||
DManipEventHandler *self = (DManipEventHandler*) self_;
|
||||
|
||||
if G_UNLIKELY (!self || !ppvObject)
|
||||
return E_POINTER;
|
||||
|
||||
*ppvObject = NULL;
|
||||
|
||||
if (IsEqualGUID (riid, &IID_IUnknown))
|
||||
*ppvObject = self;
|
||||
else if (IsEqualGUID (riid, &IID_IDirectManipulationViewportEventHandler))
|
||||
*ppvObject = self;
|
||||
|
||||
if (*ppvObject == NULL)
|
||||
return E_NOINTERFACE;
|
||||
|
||||
DManipEventHandler_AddRef (self_);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/* NOTE:
|
||||
*
|
||||
* All DManipEventHandler callbacks are fired from the main thread */
|
||||
|
||||
static STDMETHODIMP
|
||||
DManipEventHandler_OnViewportUpdated (IDirectManipulationViewportEventHandler *self_,
|
||||
IDirectManipulationViewport *viewport)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static STDMETHODIMP
|
||||
DManipEventHandler_OnContentUpdated (IDirectManipulationViewportEventHandler *self_,
|
||||
IDirectManipulationViewport *viewport,
|
||||
IDirectManipulationContent *content)
|
||||
{
|
||||
DManipEventHandler *self = (DManipEventHandler*) self_;
|
||||
float transform[6] = {1., 0., 0., 1., 0., 0.};
|
||||
HRESULT hr;
|
||||
|
||||
hr = IDirectManipulationContent_GetContentTransform (content, transform,
|
||||
G_N_ELEMENTS (transform));
|
||||
HR_CHECK_RETURN_VAL (hr, E_FAIL);
|
||||
|
||||
switch (self->gesture)
|
||||
{
|
||||
case GESTURE_PAN:
|
||||
{
|
||||
GdkModifierType state;
|
||||
uint32_t time;
|
||||
float pan_x;
|
||||
float pan_y;
|
||||
GdkEvent *event;
|
||||
|
||||
pan_x = transform[4];
|
||||
pan_y = transform[5];
|
||||
|
||||
state = util_get_modifier_state ();
|
||||
time = (uint32_t) GetMessageTime ();
|
||||
|
||||
event = gdk_scroll_event_new (self->surface,
|
||||
self->device,
|
||||
NULL, time, state,
|
||||
self->pan_x - pan_x,
|
||||
self->pan_y - pan_y,
|
||||
FALSE,
|
||||
GDK_SCROLL_UNIT_SURFACE);
|
||||
_gdk_win32_append_event (event);
|
||||
|
||||
self->pan_x = pan_x;
|
||||
self->pan_y = pan_y;
|
||||
}
|
||||
break;
|
||||
case GESTURE_ZOOM:
|
||||
{
|
||||
GdkModifierType state;
|
||||
uint32_t time;
|
||||
POINT cursor = {0, 0};
|
||||
float scale;
|
||||
GdkEvent *event;
|
||||
|
||||
scale = transform[0];
|
||||
|
||||
state = util_get_modifier_state ();
|
||||
time = (uint32_t) GetMessageTime ();
|
||||
_gdk_win32_get_cursor_pos (&cursor);
|
||||
|
||||
ScreenToClient (GDK_SURFACE_HWND (self->surface), &cursor);
|
||||
|
||||
if (!self->sequence)
|
||||
self->sequence = util_get_next_sequence ();
|
||||
|
||||
event = gdk_touchpad_event_new_pinch (self->surface, self->sequence, self->device,
|
||||
time, state, self->phase, cursor.x, cursor.y,
|
||||
2, 0.0, 0.0, scale, 0.0);
|
||||
_gdk_win32_append_event (event);
|
||||
|
||||
self->scale = scale;
|
||||
self->phase = GDK_TOUCHPAD_GESTURE_PHASE_UPDATE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static STDMETHODIMP
|
||||
DManipEventHandler_OnViewportStatusChanged (IDirectManipulationViewportEventHandler *self_,
|
||||
IDirectManipulationViewport *viewport,
|
||||
DIRECTMANIPULATION_STATUS current,
|
||||
DIRECTMANIPULATION_STATUS previous)
|
||||
{
|
||||
DManipEventHandler *self = (DManipEventHandler*) self_;
|
||||
|
||||
if (previous == DIRECTMANIPULATION_RUNNING)
|
||||
{
|
||||
switch (self->gesture)
|
||||
{
|
||||
case GESTURE_PAN:
|
||||
{
|
||||
GdkModifierType state;
|
||||
uint32_t time;
|
||||
GdkEvent *event;
|
||||
|
||||
state = util_get_modifier_state ();
|
||||
time = (uint32_t) GetMessageTime ();
|
||||
|
||||
event = gdk_scroll_event_new (self->surface, self->device,
|
||||
NULL, time, state,
|
||||
0.0, 0.0, TRUE,
|
||||
GDK_SCROLL_UNIT_SURFACE);
|
||||
_gdk_win32_append_event (event);
|
||||
}
|
||||
break;
|
||||
case GESTURE_ZOOM:
|
||||
{
|
||||
GdkModifierType state;
|
||||
uint32_t time;
|
||||
POINT cursor = {0, 0};
|
||||
GdkEvent *event;
|
||||
|
||||
if (self->phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN)
|
||||
break;
|
||||
|
||||
state = util_get_modifier_state ();
|
||||
time = (uint32_t) GetMessageTime ();
|
||||
_gdk_win32_get_cursor_pos (&cursor);
|
||||
|
||||
ScreenToClient (GDK_SURFACE_HWND (self->surface), &cursor);
|
||||
|
||||
event = gdk_touchpad_event_new_pinch (self->surface, self->sequence, self->device,
|
||||
time, state, GDK_TOUCHPAD_GESTURE_PHASE_END,
|
||||
cursor.x, cursor.y, 2, 0., 0., self->scale,
|
||||
0.);
|
||||
_gdk_win32_append_event (event);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
dmanip_event_handler_running_state_clear (self);
|
||||
reset_viewport (viewport);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static void
|
||||
dmanip_event_handler_running_state_clear (DManipEventHandler *handler)
|
||||
{
|
||||
handler->scale = 1.0;
|
||||
handler->pan_x = 0.0;
|
||||
handler->pan_y = 0.0;
|
||||
|
||||
handler->phase = GDK_TOUCHPAD_GESTURE_PHASE_BEGIN;
|
||||
handler->sequence = NULL;
|
||||
}
|
||||
|
||||
static DManipEventHandler*
|
||||
dmanip_event_handler_new (GdkSurface *surface,
|
||||
int gesture)
|
||||
{
|
||||
static IDirectManipulationViewportEventHandlerVtbl vtable = {
|
||||
DManipEventHandler_QueryInterface,
|
||||
DManipEventHandler_AddRef,
|
||||
DManipEventHandler_Release,
|
||||
DManipEventHandler_OnViewportStatusChanged,
|
||||
DManipEventHandler_OnViewportUpdated,
|
||||
DManipEventHandler_OnContentUpdated,
|
||||
};
|
||||
DManipEventHandler *handler;
|
||||
|
||||
handler = g_new0 (DManipEventHandler, 1);
|
||||
handler->vtable = &vtable;
|
||||
handler->reference_count = 1;
|
||||
|
||||
handler->gesture = gesture;
|
||||
|
||||
handler->surface = surface;
|
||||
handler->device = _gdk_device_manager->core_pointer;
|
||||
|
||||
dmanip_event_handler_running_state_clear (handler);
|
||||
|
||||
return handler;
|
||||
}
|
||||
|
||||
static void
|
||||
dmanip_event_handler_free (DManipEventHandler *handler)
|
||||
{
|
||||
g_free (handler);
|
||||
}
|
||||
|
||||
|
||||
/* }}} */
|
||||
/* {{{ Viewport utils */
|
||||
|
||||
|
||||
static void
|
||||
reset_viewport (IDirectManipulationViewport *viewport)
|
||||
{
|
||||
IDirectManipulationContent *content = NULL;
|
||||
REFIID iid = &IID_IDirectManipulationContent;
|
||||
float identity[6] = {1., 0., 0., 1., 0., 0.};
|
||||
HRESULT hr;
|
||||
|
||||
hr = IDirectManipulationViewport_GetPrimaryContent (viewport, iid, (void**)&content);
|
||||
HR_CHECK (hr);
|
||||
|
||||
hr = IDirectManipulationContent_SyncContentTransform (content, identity,
|
||||
G_N_ELEMENTS (identity));
|
||||
HR_CHECK (hr);
|
||||
}
|
||||
|
||||
static void
|
||||
close_viewport (IDirectManipulationViewport **p_viewport)
|
||||
{
|
||||
IDirectManipulationViewport *viewport = *p_viewport;
|
||||
|
||||
if (viewport)
|
||||
{
|
||||
IDirectManipulationViewport_Abandon (viewport);
|
||||
IUnknown_Release (viewport);
|
||||
|
||||
*p_viewport = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
create_viewport (GdkSurface *surface,
|
||||
int gesture,
|
||||
IDirectManipulationViewport **pViewport)
|
||||
{
|
||||
DIRECTMANIPULATION_CONFIGURATION configuration = 0;
|
||||
HWND hwnd = GDK_SURFACE_HWND (surface);
|
||||
IDirectManipulationViewportEventHandler *handler;
|
||||
DWORD cookie = 0;
|
||||
HRESULT hr;
|
||||
|
||||
hr = IDirectManipulationManager_CreateViewport (dmanipulation_manager, NULL, hwnd,
|
||||
&IID_IDirectManipulationViewport,
|
||||
(void**) pViewport);
|
||||
HR_CHECK_GOTO (hr, failed);
|
||||
|
||||
switch (gesture)
|
||||
{
|
||||
case GESTURE_PAN:
|
||||
configuration = DIRECTMANIPULATION_CONFIGURATION_INTERACTION |
|
||||
DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_X |
|
||||
DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_Y;
|
||||
break;
|
||||
case GESTURE_ZOOM:
|
||||
configuration = DIRECTMANIPULATION_CONFIGURATION_INTERACTION |
|
||||
DIRECTMANIPULATION_CONFIGURATION_SCALING;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
handler = (IDirectManipulationViewportEventHandler*)
|
||||
dmanip_event_handler_new (surface, gesture);
|
||||
|
||||
hr = IDirectManipulationViewport_AddEventHandler (*pViewport, hwnd, handler, &cookie);
|
||||
HR_CHECK_GOTO (hr, failed);
|
||||
|
||||
hr = IDirectManipulationViewport_ActivateConfiguration (*pViewport, configuration);
|
||||
HR_CHECK_GOTO (hr, failed);
|
||||
|
||||
hr = IDirectManipulationViewport_SetViewportOptions (*pViewport,
|
||||
DIRECTMANIPULATION_VIEWPORT_OPTIONS_DISABLEPIXELSNAPPING);
|
||||
|
||||
hr = IDirectManipulationViewport_Enable (*pViewport);
|
||||
HR_CHECK_GOTO (hr, failed);
|
||||
|
||||
// drop our initial reference
|
||||
IUnknown_Release (handler);
|
||||
return;
|
||||
|
||||
failed:
|
||||
if (handler)
|
||||
IUnknown_Release (handler);
|
||||
|
||||
close_viewport (pViewport);
|
||||
}
|
||||
|
||||
|
||||
/* }}} */
|
||||
/* {{{ Public */
|
||||
|
||||
|
||||
void gdk_dmanipulation_initialize (void)
|
||||
{
|
||||
if (!getPointerType)
|
||||
{
|
||||
HMODULE user32_mod;
|
||||
|
||||
user32_mod = LoadLibraryW (L"user32.dll");
|
||||
if (!user32_mod)
|
||||
{
|
||||
WIN32_API_FAILED ("LoadLibraryW");
|
||||
return;
|
||||
}
|
||||
|
||||
getPointerType = (getPointerType_t)
|
||||
GetProcAddress (user32_mod, "GetPointerType");
|
||||
|
||||
if (!getPointerType)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gdk_win32_ensure_com ())
|
||||
return;
|
||||
|
||||
if (dmanipulation_manager == NULL)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
hr = CoCreateInstance (&CLSID_DirectManipulationManager,
|
||||
NULL,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
&IID_IDirectManipulationManager,
|
||||
(LPVOID*)&dmanipulation_manager);
|
||||
if (FAILED (hr))
|
||||
{
|
||||
if (hr == REGDB_E_CLASSNOTREG || hr == E_NOINTERFACE);
|
||||
/* Not an error,
|
||||
* DirectManipulation is not available */
|
||||
else HR_LOG (hr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void gdk_dmanipulation_initialize_surface (GdkSurface *surface)
|
||||
{
|
||||
GdkWin32Surface *surface_win32;
|
||||
HRESULT hr;
|
||||
|
||||
if (!dmanipulation_manager)
|
||||
return;
|
||||
|
||||
surface_win32 = GDK_WIN32_SURFACE (surface);
|
||||
|
||||
create_viewport (surface, GESTURE_PAN,
|
||||
&surface_win32->dmanipulation_viewport_pan);
|
||||
|
||||
create_viewport (surface, GESTURE_ZOOM,
|
||||
&surface_win32->dmanipulation_viewport_zoom);
|
||||
|
||||
hr = IDirectManipulationManager_Activate (dmanipulation_manager,
|
||||
GDK_SURFACE_HWND (surface));
|
||||
HR_CHECK (hr);
|
||||
}
|
||||
|
||||
void gdk_dmanipulation_finalize_surface (GdkSurface *surface)
|
||||
{
|
||||
GdkWin32Surface *surface_win32 = GDK_WIN32_SURFACE (surface);
|
||||
|
||||
close_viewport (&surface_win32->dmanipulation_viewport_zoom);
|
||||
close_viewport (&surface_win32->dmanipulation_viewport_pan);
|
||||
}
|
||||
|
||||
void gdk_dmanipulation_maybe_add_contact (GdkSurface *surface,
|
||||
MSG *msg)
|
||||
{
|
||||
POINTER_INPUT_TYPE type = PT_POINTER;
|
||||
UINT32 pointer_id = GET_POINTERID_WPARAM (msg->wParam);
|
||||
|
||||
if (!dmanipulation_manager)
|
||||
return;
|
||||
|
||||
if (!getPointerType)
|
||||
return;
|
||||
|
||||
if G_UNLIKELY (!getPointerType (pointer_id, &type))
|
||||
{
|
||||
WIN32_API_FAILED_LOG_ONCE ("GetPointerType");
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == PT_TOUCHPAD)
|
||||
{
|
||||
GdkWin32Surface *surface_win32 = GDK_WIN32_SURFACE (surface);
|
||||
HRESULT hr;
|
||||
|
||||
hr = IDirectManipulationViewport_SetContact (surface_win32->dmanipulation_viewport_pan,
|
||||
pointer_id);
|
||||
HR_CHECK (hr);
|
||||
|
||||
hr = IDirectManipulationViewport_SetContact (surface_win32->dmanipulation_viewport_zoom,
|
||||
pointer_id);
|
||||
HR_CHECK (hr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* }}} */
|
||||
/* {{{ Utils */
|
||||
|
||||
|
||||
static gpointer
|
||||
util_get_next_sequence (void)
|
||||
{
|
||||
//TODO: sequence of other input types?
|
||||
static unsigned char *sequence_counter = 0;
|
||||
|
||||
if (++sequence_counter == 0)
|
||||
sequence_counter++;
|
||||
|
||||
return sequence_counter;
|
||||
}
|
||||
|
||||
static GdkModifierType
|
||||
util_get_modifier_state (void)
|
||||
{
|
||||
GdkModifierType mask = 0;
|
||||
BYTE kbd[256];
|
||||
|
||||
GetKeyboardState (kbd);
|
||||
if (kbd[VK_SHIFT] & 0x80)
|
||||
mask |= GDK_SHIFT_MASK;
|
||||
if (kbd[VK_CAPITAL] & 0x80)
|
||||
mask |= GDK_LOCK_MASK;
|
||||
if (kbd[VK_CONTROL] & 0x80)
|
||||
mask |= GDK_CONTROL_MASK;
|
||||
if (kbd[VK_MENU] & 0x80)
|
||||
mask |= GDK_ALT_MASK;
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
util_handler_free (gpointer handler)
|
||||
{
|
||||
dmanip_event_handler_free ((DManipEventHandler*)handler);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
|
||||
/* }}} */
|
||||
@@ -0,0 +1,32 @@
|
||||
/* gdkinput-dmanipulation.h
|
||||
*
|
||||
* Copyright © 2022 the GTK team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
#ifndef __GDK_INPUT_DMANIPULATION_H__
|
||||
#define __GDK_INPUT_DMANIPULATION_H__
|
||||
|
||||
void gdk_dmanipulation_initialize (void);
|
||||
|
||||
void gdk_dmanipulation_initialize_surface (GdkSurface *surface);
|
||||
void gdk_dmanipulation_finalize_surface (GdkSurface *surface);
|
||||
|
||||
void gdk_dmanipulation_maybe_add_contact (GdkSurface *surface,
|
||||
MSG *msg);
|
||||
|
||||
#endif /* __GDK_INPUT_DMANIPULATION_H__ */
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "gdkkeysyms.h"
|
||||
#include "gdkintl.h"
|
||||
#include "gdkprivate-win32.h"
|
||||
#include "gdkinput-dmanipulation.h"
|
||||
#include "gdkwin32.h"
|
||||
|
||||
#include <objbase.h>
|
||||
@@ -49,6 +50,12 @@
|
||||
|
||||
static gboolean gdk_synchronize = FALSE;
|
||||
|
||||
/* Whether GDK initialized COM */
|
||||
static gboolean co_initialized = FALSE;
|
||||
|
||||
/* Whether GDK initialized OLE */
|
||||
static gboolean ole_initialized = FALSE;
|
||||
|
||||
void
|
||||
_gdk_win32_surfaceing_init (void)
|
||||
{
|
||||
@@ -67,6 +74,82 @@ _gdk_win32_surfaceing_init (void)
|
||||
GDK_NOTE (EVENTS, g_print ("input_locale: %p\n", _gdk_input_locale));
|
||||
|
||||
_gdk_win32_clipdrop_init ();
|
||||
|
||||
gdk_dmanipulation_initialize ();
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_win32_ensure_com (void)
|
||||
{
|
||||
if (!co_initialized)
|
||||
{
|
||||
/* UI thread should only use STA model. See
|
||||
* -> https://devblogs.microsoft.com/oldnewthing/20080424-00/?p=22603
|
||||
* -> https://devblogs.microsoft.com/oldnewthing/20071018-00/?p=24743
|
||||
*/
|
||||
const DWORD flags = COINIT_APARTMENTTHREADED |
|
||||
COINIT_DISABLE_OLE1DDE;
|
||||
HRESULT hr;
|
||||
|
||||
hr = CoInitializeEx (NULL, flags);
|
||||
if (SUCCEEDED (hr))
|
||||
co_initialized = TRUE;
|
||||
else switch (hr)
|
||||
{
|
||||
case RPC_E_CHANGED_MODE:
|
||||
g_warning ("COM runtime already initialized on the main "
|
||||
"thread with an incompatible apartment model");
|
||||
break;
|
||||
default:
|
||||
HR_LOG (hr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return co_initialized;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_finalize_com (void)
|
||||
{
|
||||
if (co_initialized)
|
||||
{
|
||||
CoUninitialize ();
|
||||
co_initialized = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_win32_ensure_ole (void)
|
||||
{
|
||||
if (!ole_initialized)
|
||||
{
|
||||
HRESULT hr = OleInitialize (NULL);
|
||||
if (SUCCEEDED (hr))
|
||||
ole_initialized = TRUE;
|
||||
else switch (hr)
|
||||
{
|
||||
case RPC_E_CHANGED_MODE:
|
||||
g_warning ("Failed to initialize the OLE2 runtime because "
|
||||
"the thread has an incompatible apartment model");
|
||||
break;
|
||||
default:
|
||||
HR_LOG (hr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ole_initialized;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_finalize_ole (void)
|
||||
{
|
||||
if (ole_initialized)
|
||||
{
|
||||
OleUninitialize ();
|
||||
ole_initialized = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -196,6 +196,9 @@ void _gdk_remove_modal_window (GdkSurface *window);
|
||||
GdkSurface *_gdk_modal_current (void);
|
||||
gboolean _gdk_modal_blocked (GdkSurface *window);
|
||||
|
||||
gboolean gdk_win32_ensure_com (void);
|
||||
gboolean gdk_win32_ensure_ole (void);
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
void _gdk_win32_print_paletteentries (const PALETTEENTRY *pep,
|
||||
const int nentries);
|
||||
@@ -252,6 +255,13 @@ void _gdk_other_api_failed (const char *where,
|
||||
#define GDI_CALL(api, arglist) (api arglist ? 1 : (WIN32_GDI_FAILED (#api), 0))
|
||||
#define API_CALL(api, arglist) (api arglist ? 1 : (WIN32_API_FAILED (#api), 0))
|
||||
|
||||
#define HR_LOG(hr)
|
||||
|
||||
#define HR_CHECK_RETURN(hr) { if G_UNLIKELY (FAILED (hr)) return; }
|
||||
#define HR_CHECK_RETURN_VAL(hr, val) { if G_UNLIKELY (FAILED (hr)) return val; }
|
||||
#define HR_CHECK(hr)
|
||||
#define HR_CHECK_GOTO(hr, label) { if G_UNLIKELY (FAILED (hr)) goto label; }
|
||||
|
||||
extern LRESULT CALLBACK _gdk_win32_surface_procedure (HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
extern GdkDisplay *_gdk_display;
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "gdktoplevelprivate.h"
|
||||
#include "gdkwin32surface.h"
|
||||
#include "gdkwin32cursor.h"
|
||||
#include "gdkinput-dmanipulation.h"
|
||||
#include "gdkinput-winpointer.h"
|
||||
#include "gdkglcontext-win32.h"
|
||||
#include "gdkdisplay-win32.h"
|
||||
@@ -639,8 +640,14 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
}
|
||||
|
||||
gdk_surface_set_egl_native_window (surface, (void *) impl->handle);
|
||||
if (display_win32->tablet_input_api == GDK_WIN32_TABLET_INPUT_API_WINPOINTER)
|
||||
gdk_winpointer_initialize_surface (surface);
|
||||
|
||||
if (surface_type != GDK_SURFACE_TEMP)
|
||||
{
|
||||
if (display_win32->tablet_input_api == GDK_WIN32_TABLET_INPUT_API_WINPOINTER)
|
||||
gdk_winpointer_initialize_surface (surface);
|
||||
|
||||
gdk_dmanipulation_initialize_surface (surface);
|
||||
}
|
||||
|
||||
_gdk_win32_surface_enable_transparency (surface);
|
||||
_gdk_win32_surface_register_dnd (surface);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "gdk/gdkcursor.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <directmanipulation.h>
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
# include <epoxy/egl.h>
|
||||
@@ -339,6 +340,9 @@ struct _GdkWin32Surface
|
||||
} next_layout;
|
||||
gboolean force_recompute_size;
|
||||
|
||||
IDirectManipulationViewport *dmanipulation_viewport_pan;
|
||||
IDirectManipulationViewport *dmanipulation_viewport_zoom;
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
guint egl_force_redraw_all : 1;
|
||||
#endif
|
||||
|
||||
@@ -17,6 +17,7 @@ gdk_win32_sources = files([
|
||||
'gdkglcontext-win32-wgl.c',
|
||||
'gdkglobals-win32.c',
|
||||
'gdkhdataoutputstream-win32.c',
|
||||
'gdkinput-dmanipulation.c',
|
||||
'gdkinput-winpointer.c',
|
||||
'gdkkeys-win32.c',
|
||||
'gdkkeys-win32-impl.c',
|
||||
|
||||
@@ -116,9 +116,7 @@ gdk_x11_device_xi2_class_init (GdkX11DeviceXI2Class *klass)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DEVICE_ID,
|
||||
g_param_spec_int ("device-id",
|
||||
P_("Device ID"),
|
||||
P_("Device identifier"),
|
||||
g_param_spec_int ("device-id", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
@@ -145,33 +145,25 @@ gdk_x11_device_manager_xi2_class_init (GdkX11DeviceManagerXI2Class *klass)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DISPLAY,
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"Display for the device manager",
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_OPCODE,
|
||||
g_param_spec_int ("opcode",
|
||||
P_("Opcode"),
|
||||
P_("Opcode for XInput2 requests"),
|
||||
g_param_spec_int ("opcode", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_MAJOR,
|
||||
g_param_spec_int ("major",
|
||||
P_("Major"),
|
||||
P_("Major version number"),
|
||||
g_param_spec_int ("major", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_MINOR,
|
||||
g_param_spec_int ("minor",
|
||||
P_("Minor"),
|
||||
P_("Minor version number"),
|
||||
g_param_spec_int ("minor", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
@@ -94,9 +94,7 @@ gsk_gl_profiler_class_init (GskGLProfilerClass *klass)
|
||||
gobject_class->finalize = gsk_gl_profiler_finalize;
|
||||
|
||||
gsk_gl_profiler_properties[PROP_GL_CONTEXT] =
|
||||
g_param_spec_object ("gl-context",
|
||||
"GL Context",
|
||||
"The GdkGLContext used by the GL profiler",
|
||||
g_param_spec_object ("gl-context", NULL, NULL,
|
||||
GDK_TYPE_GL_CONTEXT,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
|
||||
@@ -158,6 +158,10 @@ failure:
|
||||
|
||||
gdk_profiler_end_mark (start_time, "realize GskGLRenderer", NULL);
|
||||
|
||||
/* Assert either all or no state was set */
|
||||
g_assert ((ret && self->driver != NULL && self->context != NULL && self->command_queue != NULL) ||
|
||||
(!ret && self->driver == NULL && self->context == NULL && self->command_queue == NULL));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -403,11 +407,11 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer,
|
||||
static void
|
||||
gsk_gl_renderer_dispose (GObject *object)
|
||||
{
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
GskGLRenderer *self = (GskGLRenderer *)object;
|
||||
|
||||
g_assert (self->driver == NULL);
|
||||
#endif
|
||||
if (self->driver != NULL)
|
||||
g_critical ("Attempt to dispose %s without calling gsk_renderer_unrealize()",
|
||||
G_OBJECT_TYPE_NAME (self));
|
||||
|
||||
G_OBJECT_CLASS (gsk_gl_renderer_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@@ -127,9 +127,7 @@ gsk_gl_shadow_library_class_init (GskGLShadowLibraryClass *klass)
|
||||
object_class->set_property = gsk_gl_shadow_library_set_property;
|
||||
|
||||
properties [PROP_DRIVER] =
|
||||
g_param_spec_object ("driver",
|
||||
"Driver",
|
||||
"Driver",
|
||||
g_param_spec_object ("driver", NULL, NULL,
|
||||
GSK_TYPE_GL_DRIVER,
|
||||
(G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
|
||||
@@ -256,9 +256,7 @@ gsk_gl_texture_library_class_init (GskGLTextureLibraryClass *klass)
|
||||
klass->allocate = gsk_gl_texture_library_real_allocate;
|
||||
|
||||
properties [PROP_DRIVER] =
|
||||
g_param_spec_object ("driver",
|
||||
"Driver",
|
||||
"Driver",
|
||||
g_param_spec_object ("driver", NULL, NULL,
|
||||
GSK_TYPE_GL_DRIVER,
|
||||
(G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
|
||||
+2
-6
@@ -444,9 +444,7 @@ gsk_gl_shader_class_init (GskGLShaderClass *klass)
|
||||
* The source code for the shader, as a `GBytes`.
|
||||
*/
|
||||
gsk_gl_shader_properties[GLSHADER_PROP_SOURCE] =
|
||||
g_param_spec_boxed ("source",
|
||||
"Source",
|
||||
"The sourcecode for the shader",
|
||||
g_param_spec_boxed ("source", NULL, NULL,
|
||||
G_TYPE_BYTES,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -461,9 +459,7 @@ gsk_gl_shader_class_init (GskGLShaderClass *klass)
|
||||
* will be %NULL.
|
||||
*/
|
||||
gsk_gl_shader_properties[GLSHADER_PROP_RESOURCE] =
|
||||
g_param_spec_string ("resource",
|
||||
"Resources",
|
||||
"Resource path to the source code",
|
||||
g_param_spec_string ("resource", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
|
||||
+2
-6
@@ -192,9 +192,7 @@ gsk_renderer_class_init (GskRendererClass *klass)
|
||||
* Whether the renderer has been associated with a surface or draw context.
|
||||
*/
|
||||
gsk_renderer_properties[PROP_REALIZED] =
|
||||
g_param_spec_boolean ("realized",
|
||||
"Realized",
|
||||
"The renderer has been associated with a surface or draw context",
|
||||
g_param_spec_boolean ("realized", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -204,9 +202,7 @@ gsk_renderer_class_init (GskRendererClass *klass)
|
||||
* The surface associated with renderer.
|
||||
*/
|
||||
gsk_renderer_properties[PROP_SURFACE] =
|
||||
g_param_spec_object ("surface",
|
||||
"Surface",
|
||||
"The surface associated to the renderer",
|
||||
g_param_spec_object ("surface", NULL, NULL,
|
||||
GDK_TYPE_SURFACE,
|
||||
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
@@ -1102,7 +1102,7 @@ parse_conic_gradient_node (GtkCssParser *parser)
|
||||
g_array_append_val (stops, to);
|
||||
}
|
||||
|
||||
result = gsk_conic_gradient_node_new (&bounds, ¢er, rotation,
|
||||
result = gsk_conic_gradient_node_new (&bounds, ¢er, rotation,
|
||||
(GskColorStop *) stops->data, stops->len);
|
||||
|
||||
g_array_free (stops, TRUE);
|
||||
@@ -1388,7 +1388,7 @@ parse_cairo_node (GtkCssParser *parser)
|
||||
parse_declarations (parser, declarations, G_N_ELEMENTS(declarations));
|
||||
|
||||
node = gsk_cairo_node_new (&bounds);
|
||||
|
||||
|
||||
if (surface != NULL)
|
||||
{
|
||||
cairo_t *cr = gsk_cairo_node_get_draw_context (node);
|
||||
@@ -2697,10 +2697,41 @@ render_node_print (Printer *p,
|
||||
start_node (p, "texture");
|
||||
append_rect_param (p, "bounds", &node->bounds);
|
||||
|
||||
bytes = gdk_texture_save_to_png_bytes (texture);
|
||||
|
||||
_indent (p);
|
||||
g_string_append (p->str, "texture: url(\"data:image/png;base64,");
|
||||
|
||||
switch (gdk_texture_get_format (texture))
|
||||
{
|
||||
case GDK_MEMORY_B8G8R8A8_PREMULTIPLIED:
|
||||
case GDK_MEMORY_A8R8G8B8_PREMULTIPLIED:
|
||||
case GDK_MEMORY_R8G8B8A8_PREMULTIPLIED:
|
||||
case GDK_MEMORY_B8G8R8A8:
|
||||
case GDK_MEMORY_A8R8G8B8:
|
||||
case GDK_MEMORY_R8G8B8A8:
|
||||
case GDK_MEMORY_A8B8G8R8:
|
||||
case GDK_MEMORY_R8G8B8:
|
||||
case GDK_MEMORY_B8G8R8:
|
||||
case GDK_MEMORY_R16G16B16:
|
||||
case GDK_MEMORY_R16G16B16A16_PREMULTIPLIED:
|
||||
case GDK_MEMORY_R16G16B16A16:
|
||||
bytes = gdk_texture_save_to_png_bytes (texture);
|
||||
g_string_append (p->str, "texture: url(\"data:image/png;base64,");
|
||||
break;
|
||||
|
||||
case GDK_MEMORY_R16G16B16_FLOAT:
|
||||
case GDK_MEMORY_R16G16B16A16_FLOAT_PREMULTIPLIED:
|
||||
case GDK_MEMORY_R16G16B16A16_FLOAT:
|
||||
case GDK_MEMORY_R32G32B32_FLOAT:
|
||||
case GDK_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED:
|
||||
case GDK_MEMORY_R32G32B32A32_FLOAT:
|
||||
bytes = gdk_texture_save_to_tiff_bytes (texture);
|
||||
g_string_append (p->str, "texture: url(\"data:image/tiff;base64,");
|
||||
break;
|
||||
|
||||
case GDK_MEMORY_N_FORMATS:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
b64 = base64_encode_with_linebreaks (g_bytes_get_data (bytes, NULL),
|
||||
g_bytes_get_size (bytes));
|
||||
append_escaping_newlines (p->str, b64);
|
||||
|
||||
+16
-48
@@ -378,9 +378,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* `g_get_application_name()`.
|
||||
*/
|
||||
props[PROP_NAME] =
|
||||
g_param_spec_string ("program-name",
|
||||
P_("Program name"),
|
||||
P_("The name of the program. If this is not set, it defaults to g_get_application_name()"),
|
||||
g_param_spec_string ("program-name", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -390,9 +388,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* The version of the program.
|
||||
*/
|
||||
props[PROP_VERSION] =
|
||||
g_param_spec_string ("version",
|
||||
P_("Program version"),
|
||||
P_("The version of the program"),
|
||||
g_param_spec_string ("version", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -402,9 +398,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* Copyright information for the program.
|
||||
*/
|
||||
props[PROP_COPYRIGHT] =
|
||||
g_param_spec_string ("copyright",
|
||||
P_("Copyright string"),
|
||||
P_("Copyright information for the program"),
|
||||
g_param_spec_string ("copyright", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -418,9 +412,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* not a detailed list of features.
|
||||
*/
|
||||
props[PROP_COMMENTS] =
|
||||
g_param_spec_string ("comments",
|
||||
P_("Comments string"),
|
||||
P_("Comments about the program"),
|
||||
g_param_spec_string ("comments", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -443,9 +435,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* be converted into clickable links.
|
||||
*/
|
||||
props[PROP_LICENSE] =
|
||||
g_param_spec_string ("license",
|
||||
P_("License"),
|
||||
P_("The license of the program"),
|
||||
g_param_spec_string ("license", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -463,9 +453,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* be converted into clickable links.
|
||||
*/
|
||||
props[PROP_SYSTEM_INFORMATION] =
|
||||
g_param_spec_string ("system-information",
|
||||
P_("System Information"),
|
||||
P_("Information about the system on which the program is running"),
|
||||
g_param_spec_string ("system-information", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -489,9 +477,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* a side effect.
|
||||
*/
|
||||
props[PROP_LICENSE_TYPE] =
|
||||
g_param_spec_enum ("license-type",
|
||||
P_("License Type"),
|
||||
P_("The license type of the program"),
|
||||
g_param_spec_enum ("license-type", NULL, NULL,
|
||||
GTK_TYPE_LICENSE,
|
||||
GTK_LICENSE_UNKNOWN,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -504,9 +490,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* This should be a string starting with `http://` or `https://`.
|
||||
*/
|
||||
props[PROP_WEBSITE] =
|
||||
g_param_spec_string ("website",
|
||||
P_("Website URL"),
|
||||
P_("The URL for the link to the website of the program"),
|
||||
g_param_spec_string ("website", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -516,9 +500,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* The label for the link to the website of the program.
|
||||
*/
|
||||
props[PROP_WEBSITE_LABEL] =
|
||||
g_param_spec_string ("website-label",
|
||||
P_("Website label"),
|
||||
P_("The label for the link to the website of the program"),
|
||||
g_param_spec_string ("website-label", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -531,9 +513,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* as links, see the introduction for more details.
|
||||
*/
|
||||
props[PROP_AUTHORS] =
|
||||
g_param_spec_boxed ("authors",
|
||||
P_("Authors"),
|
||||
P_("List of authors of the program"),
|
||||
g_param_spec_boxed ("authors", NULL, NULL,
|
||||
G_TYPE_STRV,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -546,9 +526,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* as links, see the introduction for more details.
|
||||
*/
|
||||
props[PROP_DOCUMENTERS] =
|
||||
g_param_spec_boxed ("documenters",
|
||||
P_("Documenters"),
|
||||
P_("List of people documenting the program"),
|
||||
g_param_spec_boxed ("documenters", NULL, NULL,
|
||||
G_TYPE_STRV,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -562,9 +540,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* as links.
|
||||
*/
|
||||
props[PROP_ARTISTS] =
|
||||
g_param_spec_boxed ("artists",
|
||||
P_("Artists"),
|
||||
P_("List of people who have contributed artwork to the program"),
|
||||
g_param_spec_boxed ("artists", NULL, NULL,
|
||||
G_TYPE_STRV,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -579,9 +555,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* as links, see the introduction for more details.
|
||||
*/
|
||||
props[PROP_TRANSLATOR_CREDITS] =
|
||||
g_param_spec_string ("translator-credits",
|
||||
P_("Translator credits"),
|
||||
P_("Credits to the translators. This string should be marked as translatable"),
|
||||
g_param_spec_string ("translator-credits", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -594,9 +568,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* [id@gtk_window_set_default_icon_name] will be used.
|
||||
*/
|
||||
props[PROP_LOGO] =
|
||||
g_param_spec_object ("logo",
|
||||
P_("Logo"),
|
||||
P_("A logo for the about box."),
|
||||
g_param_spec_object ("logo", NULL, NULL,
|
||||
GDK_TYPE_PAINTABLE,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -608,9 +580,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* This property overrides the [property@Gtk.AboutDialog:logo] property.
|
||||
*/
|
||||
props[PROP_LOGO_ICON_NAME] =
|
||||
g_param_spec_string ("logo-icon-name",
|
||||
P_("Logo Icon Name"),
|
||||
P_("A named icon to use as the logo for the about box."),
|
||||
g_param_spec_string ("logo-icon-name", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -620,9 +590,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* Whether to wrap the text in the license dialog.
|
||||
*/
|
||||
props[PROP_WRAP_LICENSE] =
|
||||
g_param_spec_boolean ("wrap-license",
|
||||
P_("Wrap license"),
|
||||
P_("Whether to wrap the license text."),
|
||||
g_param_spec_boolean ("wrap-license", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
|
||||
+1
-3
@@ -65,9 +65,7 @@ gtk_accessible_default_init (GtkAccessibleInterface *iface)
|
||||
* The accessible role cannot be changed once set.
|
||||
*/
|
||||
GParamSpec *pspec =
|
||||
g_param_spec_enum ("accessible-role",
|
||||
"Accessible Role",
|
||||
"The role of the accessible object",
|
||||
g_param_spec_enum ("accessible-role", NULL, NULL,
|
||||
GTK_TYPE_ACCESSIBLE_ROLE,
|
||||
GTK_ACCESSIBLE_ROLE_NONE,
|
||||
G_PARAM_READWRITE |
|
||||
|
||||
+2
-4
@@ -58,13 +58,11 @@ static void
|
||||
gtk_actionable_default_init (GtkActionableInterface *iface)
|
||||
{
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_string ("action-name", P_("Action name"),
|
||||
P_("The name of the associated action, like “app.quit”"),
|
||||
g_param_spec_string ("action-name", NULL, NULL,
|
||||
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_variant ("action-target", P_("Action target value"),
|
||||
P_("The parameter for action invocations"),
|
||||
g_param_spec_variant ("action-target", NULL, NULL,
|
||||
G_VARIANT_TYPE_ANY, NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -171,9 +171,7 @@ gtk_action_bar_class_init (GtkActionBarClass *klass)
|
||||
* Controls whether the action bar shows its contents.
|
||||
*/
|
||||
props[PROP_REVEALED] =
|
||||
g_param_spec_boolean ("revealed",
|
||||
P_("Reveal"),
|
||||
P_("Controls whether the action bar shows its contents or not"),
|
||||
g_param_spec_boolean ("revealed", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
|
||||
@@ -346,11 +346,11 @@ gtk_action_helper_class_init (GtkActionHelperClass *class)
|
||||
class->get_property = gtk_action_helper_get_property;
|
||||
class->finalize = gtk_action_helper_finalize;
|
||||
|
||||
gtk_action_helper_pspecs[PROP_ENABLED] = g_param_spec_boolean ("enabled", "enabled", "enabled", FALSE,
|
||||
gtk_action_helper_pspecs[PROP_ENABLED] = g_param_spec_boolean ("enabled", NULL, NULL, FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
gtk_action_helper_pspecs[PROP_ACTIVE] = g_param_spec_boolean ("active", "active", "active", FALSE,
|
||||
gtk_action_helper_pspecs[PROP_ACTIVE] = g_param_spec_boolean ("active", NULL, NULL, FALSE,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
gtk_action_helper_pspecs[PROP_ROLE] = g_param_spec_enum ("role", "role", "role",
|
||||
gtk_action_helper_pspecs[PROP_ROLE] = g_param_spec_enum ("role", NULL, NULL,
|
||||
GTK_TYPE_BUTTON_ROLE,
|
||||
GTK_BUTTON_ROLE_NORMAL,
|
||||
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -991,13 +991,15 @@ gtk_action_muxer_unregister_observer (GtkActionObservable *observable,
|
||||
GtkActionObserver *observer)
|
||||
{
|
||||
GtkActionMuxer *muxer = GTK_ACTION_MUXER (observable);
|
||||
Action *action;
|
||||
Action *action = find_observers (muxer, name);
|
||||
|
||||
action = find_observers (muxer, name);
|
||||
if (action)
|
||||
{
|
||||
g_object_weak_unref (G_OBJECT (observer), gtk_action_muxer_weak_notify, action);
|
||||
gtk_action_muxer_unregister_internal (action, observer);
|
||||
if (g_slist_find (action->watchers, observer) != NULL)
|
||||
{
|
||||
g_object_weak_unref (G_OBJECT (observer), gtk_action_muxer_weak_notify, action);
|
||||
gtk_action_muxer_unregister_internal (action, observer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1218,14 +1220,12 @@ gtk_action_muxer_class_init (GObjectClass *class)
|
||||
class->finalize = gtk_action_muxer_finalize;
|
||||
class->dispose = gtk_action_muxer_dispose;
|
||||
|
||||
properties[PROP_PARENT] = g_param_spec_object ("parent", "Parent",
|
||||
"The parent muxer",
|
||||
properties[PROP_PARENT] = g_param_spec_object ("parent", NULL, NULL,
|
||||
GTK_TYPE_ACTION_MUXER,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
properties[PROP_WIDGET] = g_param_spec_object ("widget", "Widget",
|
||||
"The widget that owns the muxer",
|
||||
properties[PROP_WIDGET] = g_param_spec_object ("widget", NULL, NULL,
|
||||
GTK_TYPE_WIDGET,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -1269,7 +1269,7 @@ gtk_action_muxer_insert (GtkActionMuxer *muxer,
|
||||
if (!muxer->groups)
|
||||
muxer->groups = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, gtk_action_muxer_free_group);
|
||||
|
||||
group = g_slice_new (Group);
|
||||
group = g_slice_new0 (Group);
|
||||
group->muxer = muxer;
|
||||
group->group = g_object_ref (action_group);
|
||||
group->prefix = g_strdup (prefix);
|
||||
|
||||
+6
-18
@@ -137,9 +137,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
|
||||
* The value of the adjustment.
|
||||
*/
|
||||
adjustment_props[PROP_VALUE] =
|
||||
g_param_spec_double ("value",
|
||||
P_("Value"),
|
||||
P_("The value of the adjustment"),
|
||||
g_param_spec_double ("value", NULL, NULL,
|
||||
-G_MAXDOUBLE, G_MAXDOUBLE,
|
||||
0.0,
|
||||
GTK_PARAM_READWRITE);
|
||||
@@ -150,9 +148,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
|
||||
* The minimum value of the adjustment.
|
||||
*/
|
||||
adjustment_props[PROP_LOWER] =
|
||||
g_param_spec_double ("lower",
|
||||
P_("Minimum Value"),
|
||||
P_("The minimum value of the adjustment"),
|
||||
g_param_spec_double ("lower", NULL, NULL,
|
||||
-G_MAXDOUBLE, G_MAXDOUBLE,
|
||||
0.0,
|
||||
GTK_PARAM_READWRITE);
|
||||
@@ -166,9 +162,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
|
||||
* property is nonzero.
|
||||
*/
|
||||
adjustment_props[PROP_UPPER] =
|
||||
g_param_spec_double ("upper",
|
||||
P_("Maximum Value"),
|
||||
P_("The maximum value of the adjustment"),
|
||||
g_param_spec_double ("upper", NULL, NULL,
|
||||
-G_MAXDOUBLE, G_MAXDOUBLE,
|
||||
0.0,
|
||||
GTK_PARAM_READWRITE);
|
||||
@@ -179,9 +173,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
|
||||
* The step increment of the adjustment.
|
||||
*/
|
||||
adjustment_props[PROP_STEP_INCREMENT] =
|
||||
g_param_spec_double ("step-increment",
|
||||
P_("Step Increment"),
|
||||
P_("The step increment of the adjustment"),
|
||||
g_param_spec_double ("step-increment", NULL, NULL,
|
||||
-G_MAXDOUBLE, G_MAXDOUBLE,
|
||||
0.0,
|
||||
GTK_PARAM_READWRITE);
|
||||
@@ -192,9 +184,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
|
||||
* The page increment of the adjustment.
|
||||
*/
|
||||
adjustment_props[PROP_PAGE_INCREMENT] =
|
||||
g_param_spec_double ("page-increment",
|
||||
P_("Page Increment"),
|
||||
P_("The page increment of the adjustment"),
|
||||
g_param_spec_double ("page-increment", NULL, NULL,
|
||||
-G_MAXDOUBLE, G_MAXDOUBLE,
|
||||
0.0,
|
||||
GTK_PARAM_READWRITE);
|
||||
@@ -209,9 +199,7 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
|
||||
* `GtkSpinButton`.
|
||||
*/
|
||||
adjustment_props[PROP_PAGE_SIZE] =
|
||||
g_param_spec_double ("page-size",
|
||||
P_("Page Size"),
|
||||
P_("The page size of the adjustment"),
|
||||
g_param_spec_double ("page-size", NULL, NULL,
|
||||
-G_MAXDOUBLE, G_MAXDOUBLE,
|
||||
0.0,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
+1
-3
@@ -67,9 +67,7 @@ gtk_app_chooser_default_init (GtkAppChooserIface *iface)
|
||||
*
|
||||
* See `GContentType` for more information about content types.
|
||||
*/
|
||||
pspec = g_param_spec_string ("content-type",
|
||||
P_("Content type"),
|
||||
P_("The content type used by the open with object"),
|
||||
pspec = g_param_spec_string ("content-type", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -682,9 +682,7 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
|
||||
* a `GtkAppChooserDialog`.
|
||||
*/
|
||||
properties[PROP_SHOW_DIALOG_ITEM] =
|
||||
g_param_spec_boolean ("show-dialog-item",
|
||||
P_("Include an “Other…” item"),
|
||||
P_("Whether the combobox should include an item that triggers a GtkAppChooserDialog"),
|
||||
g_param_spec_boolean ("show-dialog-item", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -695,9 +693,7 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
|
||||
* on top for the provided content type.
|
||||
*/
|
||||
properties[PROP_SHOW_DEFAULT_ITEM] =
|
||||
g_param_spec_boolean ("show-default-item",
|
||||
P_("Show default item"),
|
||||
P_("Whether the combobox should show the default application on top"),
|
||||
g_param_spec_boolean ("show-default-item", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -710,9 +706,7 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
|
||||
* The string may contain Pango markup.
|
||||
*/
|
||||
properties[PROP_HEADING] =
|
||||
g_param_spec_string ("heading",
|
||||
P_("Heading"),
|
||||
P_("The text to show at the top of the dialog"),
|
||||
g_param_spec_string ("heading", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -722,9 +716,7 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
|
||||
* Whether the app chooser dialog should be modal.
|
||||
*/
|
||||
properties[PROP_MODAL] =
|
||||
g_param_spec_boolean ("modal",
|
||||
P_("Modal"),
|
||||
P_("Whether the dialog should be modal"),
|
||||
g_param_spec_boolean ("modal", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
|
||||
g_object_class_install_properties (oclass, NUM_PROPERTIES, properties);
|
||||
|
||||
@@ -598,9 +598,7 @@ gtk_app_chooser_dialog_class_init (GtkAppChooserDialogClass *klass)
|
||||
* The dialog's `GtkAppChooserWidget` content type will
|
||||
* be guessed from the file, if present.
|
||||
*/
|
||||
pspec = g_param_spec_object ("gfile",
|
||||
P_("GFile"),
|
||||
P_("The GFile used by the app chooser dialog"),
|
||||
pspec = g_param_spec_object ("gfile", NULL, NULL,
|
||||
G_TYPE_FILE,
|
||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
@@ -613,9 +611,7 @@ gtk_app_chooser_dialog_class_init (GtkAppChooserDialogClass *klass)
|
||||
*
|
||||
* The string may contain Pango markup.
|
||||
*/
|
||||
pspec = g_param_spec_string ("heading",
|
||||
P_("Heading"),
|
||||
P_("The text to show at the top of the dialog"),
|
||||
pspec = g_param_spec_string ("heading", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
|
||||
G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -906,9 +906,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
||||
* If %FALSE, the default handler is listed among the recommended
|
||||
* applications.
|
||||
*/
|
||||
pspec = g_param_spec_boolean ("show-default",
|
||||
P_("Show default app"),
|
||||
P_("Whether the widget should show the default application"),
|
||||
pspec = g_param_spec_boolean ("show-default", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
|
||||
g_object_class_install_property (gobject_class, PROP_SHOW_DEFAULT, pspec);
|
||||
@@ -922,9 +920,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
||||
* If %FALSE, the recommended applications are listed
|
||||
* among the other applications.
|
||||
*/
|
||||
pspec = g_param_spec_boolean ("show-recommended",
|
||||
P_("Show recommended apps"),
|
||||
P_("Whether the widget should show recommended applications"),
|
||||
pspec = g_param_spec_boolean ("show-recommended", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
|
||||
g_object_class_install_property (gobject_class, PROP_SHOW_RECOMMENDED, pspec);
|
||||
@@ -938,9 +934,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
||||
* If %FALSE, the fallback applications are listed among the
|
||||
* other applications.
|
||||
*/
|
||||
pspec = g_param_spec_boolean ("show-fallback",
|
||||
P_("Show fallback apps"),
|
||||
P_("Whether the widget should show fallback applications"),
|
||||
pspec = g_param_spec_boolean ("show-fallback", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
|
||||
g_object_class_install_property (gobject_class, PROP_SHOW_FALLBACK, pspec);
|
||||
@@ -951,9 +945,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
||||
* Determines whether the app chooser should show a section
|
||||
* for other applications.
|
||||
*/
|
||||
pspec = g_param_spec_boolean ("show-other",
|
||||
P_("Show other apps"),
|
||||
P_("Whether the widget should show other applications"),
|
||||
pspec = g_param_spec_boolean ("show-other", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
|
||||
g_object_class_install_property (gobject_class, PROP_SHOW_OTHER, pspec);
|
||||
@@ -965,9 +957,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
||||
* in a single list, without subsections for default,
|
||||
* recommended or related applications.
|
||||
*/
|
||||
pspec = g_param_spec_boolean ("show-all",
|
||||
P_("Show all apps"),
|
||||
P_("Whether the widget should show all applications"),
|
||||
pspec = g_param_spec_boolean ("show-all", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
|
||||
g_object_class_install_property (gobject_class, PROP_SHOW_ALL, pspec);
|
||||
@@ -978,9 +968,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
|
||||
* The text that appears in the widget when there are no applications
|
||||
* for the given content type.
|
||||
*/
|
||||
pspec = g_param_spec_string ("default-text",
|
||||
P_("Widget’s default text"),
|
||||
P_("The default text appearing when there are no applications"),
|
||||
pspec = g_param_spec_string ("default-text", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
|
||||
g_object_class_install_property (gobject_class, PROP_DEFAULT_TEXT, pspec);
|
||||
|
||||
+4
-12
@@ -598,9 +598,7 @@ gtk_application_class_init (GtkApplicationClass *class)
|
||||
* [property@Gtk.Application:screensaver-active] property).
|
||||
*/
|
||||
gtk_application_props[PROP_REGISTER_SESSION] =
|
||||
g_param_spec_boolean ("register-session",
|
||||
P_("Register session"),
|
||||
P_("Register with the session manager"),
|
||||
g_param_spec_boolean ("register-session", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -617,9 +615,7 @@ gtk_application_class_init (GtkApplicationClass *class)
|
||||
* Linux.
|
||||
*/
|
||||
gtk_application_props[PROP_SCREENSAVER_ACTIVE] =
|
||||
g_param_spec_boolean ("screensaver-active",
|
||||
P_("Screensaver Active"),
|
||||
P_("Whether the screensaver is active"),
|
||||
g_param_spec_boolean ("screensaver-active", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READABLE|G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -629,9 +625,7 @@ gtk_application_class_init (GtkApplicationClass *class)
|
||||
* The `GMenuModel` to be used for the application's menu bar.
|
||||
*/
|
||||
gtk_application_props[PROP_MENUBAR] =
|
||||
g_param_spec_object ("menubar",
|
||||
P_("Menubar"),
|
||||
P_("The GMenuModel for the menubar"),
|
||||
g_param_spec_object ("menubar", NULL, NULL,
|
||||
G_TYPE_MENU_MODEL,
|
||||
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -641,9 +635,7 @@ gtk_application_class_init (GtkApplicationClass *class)
|
||||
* The currently focused window of the application.
|
||||
*/
|
||||
gtk_application_props[PROP_ACTIVE_WINDOW] =
|
||||
g_param_spec_object ("active-window",
|
||||
P_("Active window"),
|
||||
P_("The window which most recently had focus"),
|
||||
g_param_spec_object ("active-window", NULL, NULL,
|
||||
GTK_TYPE_WINDOW,
|
||||
G_PARAM_READABLE|G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
@@ -685,10 +685,7 @@ gtk_application_window_class_init (GtkApplicationWindowClass *class)
|
||||
* of whether the desktop shell is showing it or not.
|
||||
*/
|
||||
gtk_application_window_properties[PROP_SHOW_MENUBAR] =
|
||||
g_param_spec_boolean ("show-menubar",
|
||||
P_("Show a menubar"),
|
||||
P_("TRUE if the window should show a "
|
||||
"menubar at the top of the window"),
|
||||
g_param_spec_boolean ("show-menubar", NULL, NULL,
|
||||
FALSE, G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
g_object_class_install_properties (object_class, N_PROPS, gtk_application_window_properties);
|
||||
}
|
||||
|
||||
+5
-15
@@ -140,9 +140,7 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_XALIGN,
|
||||
g_param_spec_float ("xalign",
|
||||
P_("Horizontal Alignment"),
|
||||
P_("X alignment of the child"),
|
||||
g_param_spec_float ("xalign", NULL, NULL,
|
||||
0.0, 1.0, 0.5,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
/**
|
||||
@@ -152,9 +150,7 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_YALIGN,
|
||||
g_param_spec_float ("yalign",
|
||||
P_("Vertical Alignment"),
|
||||
P_("Y alignment of the child"),
|
||||
g_param_spec_float ("yalign", NULL, NULL,
|
||||
0.0, 1.0, 0.5,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
/**
|
||||
@@ -167,9 +163,7 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_RATIO,
|
||||
g_param_spec_float ("ratio",
|
||||
P_("Ratio"),
|
||||
P_("Aspect ratio if obey_child is FALSE"),
|
||||
g_param_spec_float ("ratio", NULL, NULL,
|
||||
MIN_RATIO, MAX_RATIO, 1.0,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
/**
|
||||
@@ -179,9 +173,7 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_OBEY_CHILD,
|
||||
g_param_spec_boolean ("obey-child",
|
||||
P_("Obey child"),
|
||||
P_("Force aspect ratio to match that of the frame’s child"),
|
||||
g_param_spec_boolean ("obey-child", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
/**
|
||||
@@ -191,9 +183,7 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_CHILD,
|
||||
g_param_spec_object ("child",
|
||||
P_("Child"),
|
||||
P_("The child widget"),
|
||||
g_param_spec_object ("child", NULL, NULL,
|
||||
GTK_TYPE_WIDGET,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
+6
-18
@@ -253,9 +253,7 @@ gtk_assistant_page_class_init (GtkAssistantPageClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
CHILD_PROP_PAGE_TYPE,
|
||||
g_param_spec_enum ("page-type",
|
||||
P_("Page type"),
|
||||
P_("The type of the assistant page"),
|
||||
g_param_spec_enum ("page-type", NULL, NULL,
|
||||
GTK_TYPE_ASSISTANT_PAGE_TYPE,
|
||||
GTK_ASSISTANT_PAGE_CONTENT,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
@@ -267,9 +265,7 @@ gtk_assistant_page_class_init (GtkAssistantPageClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
CHILD_PROP_PAGE_TITLE,
|
||||
g_param_spec_string ("title",
|
||||
P_("Page title"),
|
||||
P_("The title of the assistant page"),
|
||||
g_param_spec_string ("title", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -283,9 +279,7 @@ gtk_assistant_page_class_init (GtkAssistantPageClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
CHILD_PROP_PAGE_COMPLETE,
|
||||
g_param_spec_boolean ("complete",
|
||||
P_("Page complete"),
|
||||
P_("Whether all required fields on the page have been filled out"),
|
||||
g_param_spec_boolean ("complete", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -296,9 +290,7 @@ gtk_assistant_page_class_init (GtkAssistantPageClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
CHILD_PROP_CHILD,
|
||||
g_param_spec_object ("child",
|
||||
P_("Child widget"),
|
||||
P_("The content the assistant page"),
|
||||
g_param_spec_object ("child", NULL, NULL,
|
||||
GTK_TYPE_WIDGET,
|
||||
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||
}
|
||||
@@ -604,9 +596,7 @@ gtk_assistant_class_init (GtkAssistantClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_USE_HEADER_BAR,
|
||||
g_param_spec_int ("use-header-bar",
|
||||
P_("Use Header Bar"),
|
||||
P_("Use Header Bar for actions."),
|
||||
g_param_spec_int ("use-header-bar", NULL, NULL,
|
||||
-1, 1, -1,
|
||||
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
@@ -617,9 +607,7 @@ gtk_assistant_class_init (GtkAssistantClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_PAGES,
|
||||
g_param_spec_object ("pages",
|
||||
P_("Pages"),
|
||||
P_("The pages of the assistant."),
|
||||
g_param_spec_object ("pages", NULL, NULL,
|
||||
G_TYPE_LIST_MODEL,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
|
||||
+3
-9
@@ -209,9 +209,7 @@ gtk_at_context_class_init (GtkATContextClass *klass)
|
||||
* set or retrieved.
|
||||
*/
|
||||
obj_props[PROP_ACCESSIBLE_ROLE] =
|
||||
g_param_spec_enum ("accessible-role",
|
||||
"Accessible Role",
|
||||
"The accessible role of the AT context",
|
||||
g_param_spec_enum ("accessible-role", NULL, NULL,
|
||||
GTK_TYPE_ACCESSIBLE_ROLE,
|
||||
GTK_ACCESSIBLE_ROLE_NONE,
|
||||
G_PARAM_READWRITE |
|
||||
@@ -224,9 +222,7 @@ gtk_at_context_class_init (GtkATContextClass *klass)
|
||||
* The `GtkAccessible` that created the `GtkATContext` instance.
|
||||
*/
|
||||
obj_props[PROP_ACCESSIBLE] =
|
||||
g_param_spec_object ("accessible",
|
||||
"Accessible",
|
||||
"The accessible implementation",
|
||||
g_param_spec_object ("accessible", NULL, NULL,
|
||||
GTK_TYPE_ACCESSIBLE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
@@ -238,9 +234,7 @@ gtk_at_context_class_init (GtkATContextClass *klass)
|
||||
* The `GdkDisplay` for the `GtkATContext`.
|
||||
*/
|
||||
obj_props[PROP_DISPLAY] =
|
||||
g_param_spec_object ("display",
|
||||
"Display",
|
||||
"The display connection",
|
||||
g_param_spec_object ("display", NULL, NULL,
|
||||
GDK_TYPE_DISPLAY,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_STATIC_STRINGS |
|
||||
|
||||
+4
-12
@@ -213,9 +213,7 @@ gtk_bookmark_list_class_init (GtkBookmarkListClass *class)
|
||||
* The bookmark file to load.
|
||||
*/
|
||||
properties[PROP_FILENAME] =
|
||||
g_param_spec_string ("filename",
|
||||
P_("Filename"),
|
||||
P_("Bookmark file to load"),
|
||||
g_param_spec_string ("filename", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_EXPLICIT_NOTIFY);
|
||||
/**
|
||||
@@ -224,9 +222,7 @@ gtk_bookmark_list_class_init (GtkBookmarkListClass *class)
|
||||
* The attributes to query.
|
||||
*/
|
||||
properties[PROP_ATTRIBUTES] =
|
||||
g_param_spec_string ("attributes",
|
||||
P_("Attributes"),
|
||||
P_("Attributes to query"),
|
||||
g_param_spec_string ("attributes", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -236,9 +232,7 @@ gtk_bookmark_list_class_init (GtkBookmarkListClass *class)
|
||||
* Priority used when loading.
|
||||
*/
|
||||
properties[PROP_IO_PRIORITY] =
|
||||
g_param_spec_int ("io-priority",
|
||||
P_("IO priority"),
|
||||
P_("Priority used when loading"),
|
||||
g_param_spec_int ("io-priority", NULL, NULL,
|
||||
-G_MAXINT, G_MAXINT, G_PRIORITY_DEFAULT,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -248,9 +242,7 @@ gtk_bookmark_list_class_init (GtkBookmarkListClass *class)
|
||||
* %TRUE if files are being loaded.
|
||||
*/
|
||||
properties[PROP_LOADING] =
|
||||
g_param_spec_boolean ("loading",
|
||||
P_("loading"),
|
||||
P_("TRUE if files are being loaded"),
|
||||
g_param_spec_boolean ("loading", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
|
||||
+2
-6
@@ -159,9 +159,7 @@ gtk_bool_filter_class_init (GtkBoolFilterClass *class)
|
||||
* The boolean expression to evaluate on item.
|
||||
*/
|
||||
properties[PROP_EXPRESSION] =
|
||||
gtk_param_spec_expression ("expression",
|
||||
P_("Expression"),
|
||||
P_("Expression to evaluate"),
|
||||
gtk_param_spec_expression ("expression", NULL, NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
/**
|
||||
@@ -170,9 +168,7 @@ gtk_bool_filter_class_init (GtkBoolFilterClass *class)
|
||||
* If the expression result should be inverted.
|
||||
*/
|
||||
properties[PROP_INVERT] =
|
||||
g_param_spec_boolean ("invert",
|
||||
P_("Invert"),
|
||||
P_("If the expression result should be inverted"),
|
||||
g_param_spec_boolean ("invert", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
|
||||
+3
-9
@@ -258,9 +258,7 @@ gtk_box_class_init (GtkBoxClass *class)
|
||||
* The amount of space between children.
|
||||
*/
|
||||
props[PROP_SPACING] =
|
||||
g_param_spec_int ("spacing",
|
||||
P_("Spacing"),
|
||||
P_("The amount of space between children"),
|
||||
g_param_spec_int ("spacing", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -270,9 +268,7 @@ gtk_box_class_init (GtkBoxClass *class)
|
||||
* Whether the children should all be the same size.
|
||||
*/
|
||||
props[PROP_HOMOGENEOUS] =
|
||||
g_param_spec_boolean ("homogeneous",
|
||||
P_("Homogeneous"),
|
||||
P_("Whether the children should all be the same size"),
|
||||
g_param_spec_boolean ("homogeneous", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -282,9 +278,7 @@ gtk_box_class_init (GtkBoxClass *class)
|
||||
* The position of the baseline aligned widgets if extra space is available.
|
||||
*/
|
||||
props[PROP_BASELINE_POSITION] =
|
||||
g_param_spec_enum ("baseline-position",
|
||||
P_("Baseline position"),
|
||||
P_("The position of the baseline aligned widgets if extra space is available"),
|
||||
g_param_spec_enum ("baseline-position", NULL, NULL,
|
||||
GTK_TYPE_BASELINE_POSITION,
|
||||
GTK_BASELINE_POSITION_CENTER,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
+3
-9
@@ -896,9 +896,7 @@ gtk_box_layout_class_init (GtkBoxLayoutClass *klass)
|
||||
* equally among the children.
|
||||
*/
|
||||
box_layout_props[PROP_HOMOGENEOUS] =
|
||||
g_param_spec_boolean ("homogeneous",
|
||||
P_("Homogeneous"),
|
||||
P_("Distribute space homogeneously"),
|
||||
g_param_spec_boolean ("homogeneous", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE |
|
||||
G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -909,9 +907,7 @@ gtk_box_layout_class_init (GtkBoxLayoutClass *klass)
|
||||
* The space to put between the children.
|
||||
*/
|
||||
box_layout_props[PROP_SPACING] =
|
||||
g_param_spec_int ("spacing",
|
||||
P_("Spacing"),
|
||||
P_("Spacing between widgets"),
|
||||
g_param_spec_int ("spacing", NULL, NULL,
|
||||
0, G_MAXINT, 0,
|
||||
GTK_PARAM_READWRITE |
|
||||
G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -926,9 +922,7 @@ gtk_box_layout_class_init (GtkBoxLayoutClass *klass)
|
||||
* at least one child with a baseline alignment.
|
||||
*/
|
||||
box_layout_props[PROP_BASELINE_POSITION] =
|
||||
g_param_spec_enum ("baseline-position",
|
||||
P_("Baseline position"),
|
||||
P_("The position of the baseline aligned widgets if extra space is available"),
|
||||
g_param_spec_enum ("baseline-position", NULL, NULL,
|
||||
GTK_TYPE_BASELINE_POSITION,
|
||||
GTK_BASELINE_POSITION_CENTER,
|
||||
GTK_PARAM_READWRITE |
|
||||
|
||||
+3
-9
@@ -305,9 +305,7 @@ gtk_builder_class_init (GtkBuilderClass *klass)
|
||||
* otherwise g_dgettext().
|
||||
*/
|
||||
builder_props[PROP_TRANSLATION_DOMAIN] =
|
||||
g_param_spec_string ("translation-domain",
|
||||
P_("Translation Domain"),
|
||||
P_("The translation domain used by gettext"),
|
||||
g_param_spec_string ("translation-domain", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
@@ -317,9 +315,7 @@ gtk_builder_class_init (GtkBuilderClass *klass)
|
||||
* The object the builder is evaluating for.
|
||||
*/
|
||||
builder_props[PROP_CURRENT_OBJECT] =
|
||||
g_param_spec_object ("current-object",
|
||||
P_("Current object"),
|
||||
P_("The object the builder is evaluating for"),
|
||||
g_param_spec_object ("current-object", NULL, NULL,
|
||||
G_TYPE_OBJECT,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
@@ -329,9 +325,7 @@ gtk_builder_class_init (GtkBuilderClass *klass)
|
||||
* The scope the builder is operating in
|
||||
*/
|
||||
builder_props[PROP_SCOPE] =
|
||||
g_param_spec_object ("scope",
|
||||
P_("Scope"),
|
||||
P_("The scope the builder is operating in"),
|
||||
g_param_spec_object ("scope", NULL, NULL,
|
||||
GTK_TYPE_BUILDER_SCOPE,
|
||||
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT);
|
||||
|
||||
|
||||
@@ -264,9 +264,7 @@ gtk_builder_list_item_factory_class_init (GtkBuilderListItemFactoryClass *klass)
|
||||
* `GBytes` containing the UI definition.
|
||||
*/
|
||||
properties[PROP_BYTES] =
|
||||
g_param_spec_boxed ("bytes",
|
||||
P_("Bytes"),
|
||||
P_("bytes containing the UI definition"),
|
||||
g_param_spec_boxed ("bytes", NULL, NULL,
|
||||
G_TYPE_BYTES,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -276,9 +274,7 @@ gtk_builder_list_item_factory_class_init (GtkBuilderListItemFactoryClass *klass)
|
||||
* Path of the resource containing the UI definition.
|
||||
*/
|
||||
properties[PROP_RESOURCE] =
|
||||
g_param_spec_string ("resource",
|
||||
P_("Resource"),
|
||||
P_("resource containing the UI definition"),
|
||||
g_param_spec_string ("resource", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -288,9 +284,7 @@ gtk_builder_list_item_factory_class_init (GtkBuilderListItemFactoryClass *klass)
|
||||
* `GtkBuilderScope` to use when instantiating listitems
|
||||
*/
|
||||
properties[PROP_SCOPE] =
|
||||
g_param_spec_object ("scope",
|
||||
P_("Scope"),
|
||||
P_("scope to use when instantiating listitems"),
|
||||
g_param_spec_object ("scope", NULL, NULL,
|
||||
GTK_TYPE_BUILDER_SCOPE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
+5
-15
@@ -218,9 +218,7 @@ gtk_button_class_init (GtkButtonClass *klass)
|
||||
* Text of the label inside the button, if the button contains a label widget.
|
||||
*/
|
||||
props[PROP_LABEL] =
|
||||
g_param_spec_string ("label",
|
||||
P_("Label"),
|
||||
P_("Text of the label widget inside the button, if the button contains a label widget"),
|
||||
g_param_spec_string ("label", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -231,9 +229,7 @@ gtk_button_class_init (GtkButtonClass *klass)
|
||||
* to be used as mnemonic.
|
||||
*/
|
||||
props[PROP_USE_UNDERLINE] =
|
||||
g_param_spec_boolean ("use-underline",
|
||||
P_("Use underline"),
|
||||
P_("If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key"),
|
||||
g_param_spec_boolean ("use-underline", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -243,9 +239,7 @@ gtk_button_class_init (GtkButtonClass *klass)
|
||||
* Whether the button has a frame.
|
||||
*/
|
||||
props[PROP_HAS_FRAME] =
|
||||
g_param_spec_boolean ("has-frame",
|
||||
P_("Has Frame"),
|
||||
P_("Whether the button has a frame"),
|
||||
g_param_spec_boolean ("has-frame", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -255,9 +249,7 @@ gtk_button_class_init (GtkButtonClass *klass)
|
||||
* The name of the icon used to automatically populate the button.
|
||||
*/
|
||||
props[PROP_ICON_NAME] =
|
||||
g_param_spec_string ("icon-name",
|
||||
P_("Icon Name"),
|
||||
P_("The name of the icon used to automatically populate the button"),
|
||||
g_param_spec_string ("icon-name", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -267,9 +259,7 @@ gtk_button_class_init (GtkButtonClass *klass)
|
||||
* The child widget.
|
||||
*/
|
||||
props[PROP_CHILD] =
|
||||
g_param_spec_object ("child",
|
||||
P_("Child"),
|
||||
P_("The child widget"),
|
||||
g_param_spec_object ("child", NULL, NULL,
|
||||
GTK_TYPE_WIDGET,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
|
||||
+6
-18
@@ -372,9 +372,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_YEAR,
|
||||
g_param_spec_int ("year",
|
||||
P_("Year"),
|
||||
P_("The selected year"),
|
||||
g_param_spec_int ("year", NULL, NULL,
|
||||
1, 9999, 1,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -387,9 +385,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_MONTH,
|
||||
g_param_spec_int ("month",
|
||||
P_("Month"),
|
||||
P_("The selected month (as a number between 0 and 11)"),
|
||||
g_param_spec_int ("month", NULL, NULL,
|
||||
0, 11, 0,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -400,9 +396,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_DAY,
|
||||
g_param_spec_int ("day",
|
||||
P_("Day"),
|
||||
P_("The selected day (as a number between 1 and 31)"),
|
||||
g_param_spec_int ("day", NULL, NULL,
|
||||
1, 31, 1,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -413,9 +407,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_SHOW_HEADING,
|
||||
g_param_spec_boolean ("show-heading",
|
||||
P_("Show Heading"),
|
||||
P_("If TRUE, a heading is displayed"),
|
||||
g_param_spec_boolean ("show-heading", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -426,9 +418,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_SHOW_DAY_NAMES,
|
||||
g_param_spec_boolean ("show-day-names",
|
||||
P_("Show Day Names"),
|
||||
P_("If TRUE, day names are displayed"),
|
||||
g_param_spec_boolean ("show-day-names", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
/**
|
||||
@@ -438,9 +428,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_SHOW_WEEK_NUMBERS,
|
||||
g_param_spec_boolean ("show-week-numbers",
|
||||
P_("Show Week Numbers"),
|
||||
P_("If TRUE, week numbers are displayed"),
|
||||
g_param_spec_boolean ("show-week-numbers", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
+3
-9
@@ -774,9 +774,7 @@ gtk_cell_area_class_init (GtkCellAreaClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_FOCUS_CELL,
|
||||
g_param_spec_object ("focus-cell",
|
||||
P_("Focus Cell"),
|
||||
P_("The cell which currently has focus"),
|
||||
g_param_spec_object ("focus-cell", NULL, NULL,
|
||||
GTK_TYPE_CELL_RENDERER,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -790,9 +788,7 @@ gtk_cell_area_class_init (GtkCellAreaClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_EDITED_CELL,
|
||||
g_param_spec_object ("edited-cell",
|
||||
P_("Edited Cell"),
|
||||
P_("The cell which is currently being edited"),
|
||||
g_param_spec_object ("edited-cell", NULL, NULL,
|
||||
GTK_TYPE_CELL_RENDERER,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
@@ -806,9 +802,7 @@ gtk_cell_area_class_init (GtkCellAreaClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_EDIT_WIDGET,
|
||||
g_param_spec_object ("edit-widget",
|
||||
P_("Edit Widget"),
|
||||
P_("The widget currently editing the edited cell"),
|
||||
g_param_spec_object ("edit-widget", NULL, NULL,
|
||||
GTK_TYPE_CELL_EDITABLE,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
|
||||
+5
-16
@@ -312,9 +312,7 @@ gtk_cell_area_box_class_init (GtkCellAreaBoxClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_SPACING,
|
||||
g_param_spec_int ("spacing",
|
||||
P_("Spacing"),
|
||||
P_("Space which is inserted between cells"),
|
||||
g_param_spec_int ("spacing", NULL, NULL,
|
||||
0,
|
||||
G_MAXINT,
|
||||
0,
|
||||
@@ -330,9 +328,7 @@ gtk_cell_area_box_class_init (GtkCellAreaBoxClass *class)
|
||||
gtk_cell_area_class_install_cell_property (area_class,
|
||||
CELL_PROP_EXPAND,
|
||||
g_param_spec_boolean
|
||||
("expand",
|
||||
P_("Expand"),
|
||||
P_("Whether the cell expands"),
|
||||
("expand", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -344,9 +340,7 @@ gtk_cell_area_box_class_init (GtkCellAreaBoxClass *class)
|
||||
gtk_cell_area_class_install_cell_property (area_class,
|
||||
CELL_PROP_ALIGN,
|
||||
g_param_spec_boolean
|
||||
("align",
|
||||
P_("Align"),
|
||||
P_("Whether cell should align with adjacent rows"),
|
||||
("align", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -359,9 +353,7 @@ gtk_cell_area_box_class_init (GtkCellAreaBoxClass *class)
|
||||
gtk_cell_area_class_install_cell_property (area_class,
|
||||
CELL_PROP_FIXED_SIZE,
|
||||
g_param_spec_boolean
|
||||
("fixed-size",
|
||||
P_("Fixed Size"),
|
||||
P_("Whether cells should be the same size in all rows"),
|
||||
("fixed-size", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -374,10 +366,7 @@ gtk_cell_area_box_class_init (GtkCellAreaBoxClass *class)
|
||||
gtk_cell_area_class_install_cell_property (area_class,
|
||||
CELL_PROP_PACK_TYPE,
|
||||
g_param_spec_enum
|
||||
("pack-type",
|
||||
P_("Pack Type"),
|
||||
P_("A GtkPackType indicating whether the cell is packed with "
|
||||
"reference to the start or end of the cell area"),
|
||||
("pack-type", NULL, NULL,
|
||||
GTK_TYPE_PACK_TYPE, GTK_PACK_START,
|
||||
GTK_PARAM_READWRITE));
|
||||
}
|
||||
|
||||
@@ -109,9 +109,7 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_CELL_AREA,
|
||||
g_param_spec_object ("area",
|
||||
P_("Area"),
|
||||
P_("The Cell Area this context was created for"),
|
||||
g_param_spec_object ("area", NULL, NULL,
|
||||
GTK_TYPE_CELL_AREA,
|
||||
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
@@ -124,9 +122,7 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_MIN_WIDTH,
|
||||
g_param_spec_int ("minimum-width",
|
||||
P_("Minimum Width"),
|
||||
P_("Minimum cached width"),
|
||||
g_param_spec_int ("minimum-width", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
@@ -139,9 +135,7 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_NAT_WIDTH,
|
||||
g_param_spec_int ("natural-width",
|
||||
P_("Minimum Width"),
|
||||
P_("Minimum cached width"),
|
||||
g_param_spec_int ("natural-width", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
@@ -154,9 +148,7 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_MIN_HEIGHT,
|
||||
g_param_spec_int ("minimum-height",
|
||||
P_("Minimum Height"),
|
||||
P_("Minimum cached height"),
|
||||
g_param_spec_int ("minimum-height", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
@@ -169,9 +161,7 @@ gtk_cell_area_context_class_init (GtkCellAreaContextClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_NAT_HEIGHT,
|
||||
g_param_spec_int ("natural-height",
|
||||
P_("Minimum Height"),
|
||||
P_("Minimum cached height"),
|
||||
g_param_spec_int ("natural-height", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
GTK_PARAM_READABLE));
|
||||
}
|
||||
|
||||
@@ -44,9 +44,7 @@ gtk_cell_editable_default_init (GtkCellEditableInterface *iface)
|
||||
* Indicates whether editing on the cell has been canceled.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_boolean ("editing-canceled",
|
||||
P_("Editing Canceled"),
|
||||
P_("Indicates that editing has been canceled"),
|
||||
g_param_spec_boolean ("editing-canceled", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
+15
-45
@@ -277,33 +277,25 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_MODE,
|
||||
g_param_spec_enum ("mode",
|
||||
P_("mode"),
|
||||
P_("Editable mode of the CellRenderer"),
|
||||
g_param_spec_enum ("mode", NULL, NULL,
|
||||
GTK_TYPE_CELL_RENDERER_MODE,
|
||||
GTK_CELL_RENDERER_MODE_INERT,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_VISIBLE,
|
||||
g_param_spec_boolean ("visible",
|
||||
P_("visible"),
|
||||
P_("Display the cell"),
|
||||
g_param_spec_boolean ("visible", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_SENSITIVE,
|
||||
g_param_spec_boolean ("sensitive",
|
||||
P_("Sensitive"),
|
||||
P_("Display the cell sensitive"),
|
||||
g_param_spec_boolean ("sensitive", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_XALIGN,
|
||||
g_param_spec_float ("xalign",
|
||||
P_("xalign"),
|
||||
P_("The x-align"),
|
||||
g_param_spec_float ("xalign", NULL, NULL,
|
||||
0.0,
|
||||
1.0,
|
||||
0.5,
|
||||
@@ -311,9 +303,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_YALIGN,
|
||||
g_param_spec_float ("yalign",
|
||||
P_("yalign"),
|
||||
P_("The y-align"),
|
||||
g_param_spec_float ("yalign", NULL, NULL,
|
||||
0.0,
|
||||
1.0,
|
||||
0.5,
|
||||
@@ -321,9 +311,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_XPAD,
|
||||
g_param_spec_uint ("xpad",
|
||||
P_("xpad"),
|
||||
P_("The xpad"),
|
||||
g_param_spec_uint ("xpad", NULL, NULL,
|
||||
0,
|
||||
G_MAXUINT,
|
||||
0,
|
||||
@@ -331,9 +319,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_YPAD,
|
||||
g_param_spec_uint ("ypad",
|
||||
P_("ypad"),
|
||||
P_("The ypad"),
|
||||
g_param_spec_uint ("ypad", NULL, NULL,
|
||||
0,
|
||||
G_MAXUINT,
|
||||
0,
|
||||
@@ -341,9 +327,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_WIDTH,
|
||||
g_param_spec_int ("width",
|
||||
P_("width"),
|
||||
P_("The fixed width"),
|
||||
g_param_spec_int ("width", NULL, NULL,
|
||||
-1,
|
||||
G_MAXINT,
|
||||
-1,
|
||||
@@ -351,9 +335,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_HEIGHT,
|
||||
g_param_spec_int ("height",
|
||||
P_("height"),
|
||||
P_("The fixed height"),
|
||||
g_param_spec_int ("height", NULL, NULL,
|
||||
-1,
|
||||
G_MAXINT,
|
||||
-1,
|
||||
@@ -361,26 +343,20 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_IS_EXPANDER,
|
||||
g_param_spec_boolean ("is-expander",
|
||||
P_("Is Expander"),
|
||||
P_("Row has children"),
|
||||
g_param_spec_boolean ("is-expander", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_IS_EXPANDED,
|
||||
g_param_spec_boolean ("is-expanded",
|
||||
P_("Is Expanded"),
|
||||
P_("Row is an expander row, and is expanded"),
|
||||
g_param_spec_boolean ("is-expanded", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_CELL_BACKGROUND,
|
||||
g_param_spec_string ("cell-background",
|
||||
P_("Cell background color name"),
|
||||
P_("Cell background color as a string"),
|
||||
g_param_spec_string ("cell-background", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE));
|
||||
|
||||
@@ -391,26 +367,20 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_CELL_BACKGROUND_RGBA,
|
||||
g_param_spec_boxed ("cell-background-rgba",
|
||||
P_("Cell background RGBA color"),
|
||||
P_("Cell background color as a GdkRGBA"),
|
||||
g_param_spec_boxed ("cell-background-rgba", NULL, NULL,
|
||||
GDK_TYPE_RGBA,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_EDITING,
|
||||
g_param_spec_boolean ("editing",
|
||||
P_("Editing"),
|
||||
P_("Whether the cell renderer is currently in editing mode"),
|
||||
g_param_spec_boolean ("editing", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
|
||||
#define ADD_SET_PROP(propname, propval, nick, blurb) g_object_class_install_property (object_class, propval, g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY))
|
||||
|
||||
ADD_SET_PROP ("cell-background-set", PROP_CELL_BACKGROUND_SET,
|
||||
P_("Cell background set"),
|
||||
P_("Whether the cell background color is set"));
|
||||
ADD_SET_PROP ("cell-background-set", PROP_CELL_BACKGROUND_SET, NULL, NULL);
|
||||
|
||||
if (GtkCellRenderer_private_offset != 0)
|
||||
g_type_class_adjust_private_offset (class, &GtkCellRenderer_private_offset);
|
||||
|
||||
@@ -171,9 +171,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ACCEL_KEY,
|
||||
g_param_spec_uint ("accel-key",
|
||||
P_("Accelerator key"),
|
||||
P_("The keyval of the accelerator"),
|
||||
g_param_spec_uint ("accel-key", NULL, NULL,
|
||||
0,
|
||||
G_MAXINT,
|
||||
0,
|
||||
@@ -186,9 +184,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ACCEL_MODS,
|
||||
g_param_spec_flags ("accel-mods",
|
||||
P_("Accelerator modifiers"),
|
||||
P_("The modifier mask of the accelerator"),
|
||||
g_param_spec_flags ("accel-mods", NULL, NULL,
|
||||
GDK_TYPE_MODIFIER_TYPE,
|
||||
0,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
@@ -202,9 +198,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_KEYCODE,
|
||||
g_param_spec_uint ("keycode",
|
||||
P_("Accelerator keycode"),
|
||||
P_("The hardware keycode of the accelerator"),
|
||||
g_param_spec_uint ("keycode", NULL, NULL,
|
||||
0,
|
||||
G_MAXINT,
|
||||
0,
|
||||
@@ -220,9 +214,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ACCEL_MODE,
|
||||
g_param_spec_enum ("accel-mode",
|
||||
P_("Accelerator Mode"),
|
||||
P_("The type of accelerators"),
|
||||
g_param_spec_enum ("accel-mode", NULL, NULL,
|
||||
GTK_TYPE_CELL_RENDERER_ACCEL_MODE,
|
||||
GTK_CELL_RENDERER_ACCEL_MODE_GTK,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -130,9 +130,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_MODEL,
|
||||
g_param_spec_object ("model",
|
||||
P_("Model"),
|
||||
P_("The model containing the possible values for the combo box"),
|
||||
g_param_spec_object ("model", NULL, NULL,
|
||||
GTK_TYPE_TREE_MODEL,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -151,9 +149,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_TEXT_COLUMN,
|
||||
g_param_spec_int ("text-column",
|
||||
P_("Text Column"),
|
||||
P_("A column in the data source model to get the strings from"),
|
||||
g_param_spec_int ("text-column", NULL, NULL,
|
||||
-1,
|
||||
G_MAXINT,
|
||||
-1,
|
||||
@@ -167,9 +163,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_HAS_ENTRY,
|
||||
g_param_spec_boolean ("has-entry",
|
||||
P_("Has Entry"),
|
||||
P_("If FALSE, don’t allow to enter strings other than the chosen ones"),
|
||||
g_param_spec_boolean ("has-entry", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
@@ -194,25 +194,19 @@ gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF,
|
||||
g_param_spec_object ("pixbuf",
|
||||
P_("Pixbuf Object"),
|
||||
P_("The pixbuf to render"),
|
||||
g_param_spec_object ("pixbuf", NULL, NULL,
|
||||
GDK_TYPE_PIXBUF,
|
||||
GTK_PARAM_WRITABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF_EXPANDER_OPEN,
|
||||
g_param_spec_object ("pixbuf-expander-open",
|
||||
P_("Pixbuf Expander Open"),
|
||||
P_("Pixbuf for open expander"),
|
||||
g_param_spec_object ("pixbuf-expander-open", NULL, NULL,
|
||||
GDK_TYPE_PIXBUF,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PIXBUF_EXPANDER_CLOSED,
|
||||
g_param_spec_object ("pixbuf-expander-closed",
|
||||
P_("Pixbuf Expander Closed"),
|
||||
P_("Pixbuf for closed expander"),
|
||||
g_param_spec_object ("pixbuf-expander-closed", NULL, NULL,
|
||||
GDK_TYPE_PIXBUF,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -221,9 +215,7 @@ gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_TEXTURE,
|
||||
g_param_spec_object ("texture",
|
||||
P_("Texture"),
|
||||
P_("The texture to render"),
|
||||
g_param_spec_object ("texture", NULL, NULL,
|
||||
GDK_TYPE_TEXTURE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -234,9 +226,7 @@ gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ICON_SIZE,
|
||||
g_param_spec_enum ("icon-size",
|
||||
P_("Icon Size"),
|
||||
P_("The GtkIconSize value that specifies the size of the rendered icon"),
|
||||
g_param_spec_enum ("icon-size", NULL, NULL,
|
||||
GTK_TYPE_ICON_SIZE,
|
||||
GTK_ICON_SIZE_INHERIT,
|
||||
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY));
|
||||
@@ -249,9 +239,7 @@ gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ICON_NAME,
|
||||
g_param_spec_string ("icon-name",
|
||||
P_("Icon Name"),
|
||||
P_("The name of the icon from the icon theme"),
|
||||
g_param_spec_string ("icon-name", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -264,9 +252,7 @@ gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_GICON,
|
||||
g_param_spec_object ("gicon",
|
||||
P_("Icon"),
|
||||
P_("The GIcon being displayed"),
|
||||
g_param_spec_object ("gicon", NULL, NULL,
|
||||
G_TYPE_ICON,
|
||||
GTK_PARAM_READWRITE));
|
||||
}
|
||||
|
||||
@@ -617,9 +617,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
|
||||
**/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_VALUE,
|
||||
g_param_spec_int ("value",
|
||||
P_("Value"),
|
||||
P_("Value of the progress bar"),
|
||||
g_param_spec_int ("value", NULL, NULL,
|
||||
0, 100, 0,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -633,9 +631,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
|
||||
**/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_TEXT,
|
||||
g_param_spec_string ("text",
|
||||
P_("Text"),
|
||||
P_("Text on the progress bar"),
|
||||
g_param_spec_string ("text", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -655,9 +651,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PULSE,
|
||||
g_param_spec_int ("pulse",
|
||||
P_("Pulse"),
|
||||
P_("Set this to positive values to indicate that some progress is made, but you don’t know how much."),
|
||||
g_param_spec_int ("pulse", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -670,9 +664,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_TEXT_XALIGN,
|
||||
g_param_spec_float ("text-xalign",
|
||||
P_("Text x alignment"),
|
||||
P_("The horizontal text alignment, from 0 (left) to 1 (right). Reversed for RTL layouts."),
|
||||
g_param_spec_float ("text-xalign", NULL, NULL,
|
||||
0.0, 1.0, 0.5,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -685,9 +677,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_TEXT_YALIGN,
|
||||
g_param_spec_float ("text-yalign",
|
||||
P_("Text y alignment"),
|
||||
P_("The vertical text alignment, from 0 (top) to 1 (bottom)."),
|
||||
g_param_spec_float ("text-yalign", NULL, NULL,
|
||||
0.0, 1.0, 0.5,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -697,9 +687,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_INVERTED,
|
||||
g_param_spec_boolean ("inverted",
|
||||
P_("Inverted"),
|
||||
P_("Invert the direction in which the progress bar grows"),
|
||||
g_param_spec_boolean ("inverted", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
}
|
||||
|
||||
@@ -127,9 +127,7 @@ gtk_cell_renderer_spin_class_init (GtkCellRendererSpinClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ADJUSTMENT,
|
||||
g_param_spec_object ("adjustment",
|
||||
P_("Adjustment"),
|
||||
P_("The adjustment that holds the value of the spin button"),
|
||||
g_param_spec_object ("adjustment", NULL, NULL,
|
||||
GTK_TYPE_ADJUSTMENT,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -141,9 +139,7 @@ gtk_cell_renderer_spin_class_init (GtkCellRendererSpinClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_CLIMB_RATE,
|
||||
g_param_spec_double ("climb-rate",
|
||||
P_("Climb rate"),
|
||||
P_("The acceleration rate when you hold down a button"),
|
||||
g_param_spec_double ("climb-rate", NULL, NULL,
|
||||
0.0, G_MAXDOUBLE, 0.0,
|
||||
GTK_PARAM_READWRITE));
|
||||
/**
|
||||
@@ -153,9 +149,7 @@ gtk_cell_renderer_spin_class_init (GtkCellRendererSpinClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_DIGITS,
|
||||
g_param_spec_uint ("digits",
|
||||
P_("Digits"),
|
||||
P_("The number of decimal places to display"),
|
||||
g_param_spec_uint ("digits", NULL, NULL,
|
||||
0, 20, 0,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
}
|
||||
|
||||
@@ -177,9 +177,7 @@ gtk_cell_renderer_spinner_class_init (GtkCellRendererSpinnerClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ACTIVE,
|
||||
g_param_spec_boolean ("active",
|
||||
P_("Active"),
|
||||
P_("Whether the spinner is active (ie. shown) in the cell"),
|
||||
g_param_spec_boolean ("active", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -194,9 +192,7 @@ gtk_cell_renderer_spinner_class_init (GtkCellRendererSpinnerClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PULSE,
|
||||
g_param_spec_uint ("pulse",
|
||||
P_("Pulse"),
|
||||
P_("Pulse of the spinner"),
|
||||
g_param_spec_uint ("pulse", NULL, NULL,
|
||||
0, G_MAXUINT, 0,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -207,9 +203,7 @@ gtk_cell_renderer_spinner_class_init (GtkCellRendererSpinnerClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_SIZE,
|
||||
g_param_spec_enum ("size",
|
||||
P_("Size"),
|
||||
P_("The GtkIconSize value that specifies the size of the rendered spinner"),
|
||||
g_param_spec_enum ("size", NULL, NULL,
|
||||
GTK_TYPE_ICON_SIZE, GTK_ICON_SIZE_INHERIT,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
+46
-144
@@ -249,37 +249,27 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
cell_class->get_aligned_area = gtk_cell_renderer_text_get_aligned_area;
|
||||
|
||||
text_cell_renderer_props[PROP_TEXT] =
|
||||
g_param_spec_string ("text",
|
||||
P_("Text"),
|
||||
P_("Text to render"),
|
||||
g_param_spec_string ("text", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_MARKUP] =
|
||||
g_param_spec_string ("markup",
|
||||
P_("Markup"),
|
||||
P_("Marked up text to render"),
|
||||
g_param_spec_string ("markup", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE);
|
||||
|
||||
text_cell_renderer_props[PROP_ATTRIBUTES] =
|
||||
g_param_spec_boxed ("attributes",
|
||||
P_("Attributes"),
|
||||
P_("A list of style attributes to apply to the text of the renderer"),
|
||||
g_param_spec_boxed ("attributes", NULL, NULL,
|
||||
PANGO_TYPE_ATTR_LIST,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_SINGLE_PARAGRAPH_MODE] =
|
||||
g_param_spec_boolean ("single-paragraph-mode",
|
||||
P_("Single Paragraph Mode"),
|
||||
P_("Whether to keep all text in a single paragraph"),
|
||||
g_param_spec_boolean ("single-paragraph-mode", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
text_cell_renderer_props[PROP_BACKGROUND] =
|
||||
g_param_spec_string ("background",
|
||||
P_("Background color name"),
|
||||
P_("Background color as a string"),
|
||||
g_param_spec_string ("background", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE);
|
||||
|
||||
@@ -289,15 +279,11 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* Background color as a `GdkRGBA`
|
||||
*/
|
||||
text_cell_renderer_props[PROP_BACKGROUND_RGBA] =
|
||||
g_param_spec_boxed ("background-rgba",
|
||||
P_("Background color as RGBA"),
|
||||
P_("Background color as a GdkRGBA"),
|
||||
g_param_spec_boxed ("background-rgba", NULL, NULL,
|
||||
GDK_TYPE_RGBA,
|
||||
GTK_PARAM_READWRITE);
|
||||
text_cell_renderer_props[PROP_FOREGROUND] =
|
||||
g_param_spec_string ("foreground",
|
||||
P_("Foreground color name"),
|
||||
P_("Foreground color as a string"),
|
||||
g_param_spec_string ("foreground", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE);
|
||||
|
||||
@@ -307,127 +293,93 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* Foreground color as a `GdkRGBA`
|
||||
*/
|
||||
text_cell_renderer_props[PROP_FOREGROUND_RGBA] =
|
||||
g_param_spec_boxed ("foreground-rgba",
|
||||
P_("Foreground color as RGBA"),
|
||||
P_("Foreground color as a GdkRGBA"),
|
||||
g_param_spec_boxed ("foreground-rgba", NULL, NULL,
|
||||
GDK_TYPE_RGBA,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
|
||||
text_cell_renderer_props[PROP_EDITABLE] =
|
||||
g_param_spec_boolean ("editable",
|
||||
P_("Editable"),
|
||||
P_("Whether the text can be modified by the user"),
|
||||
g_param_spec_boolean ("editable", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_FONT] =
|
||||
g_param_spec_string ("font",
|
||||
P_("Font"),
|
||||
P_("Font description as a string, e.g. “Sans Italic 12”"),
|
||||
g_param_spec_string ("font", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_FONT_DESC] =
|
||||
g_param_spec_boxed ("font-desc",
|
||||
P_("Font"),
|
||||
P_("Font description as a PangoFontDescription struct"),
|
||||
g_param_spec_boxed ("font-desc", NULL, NULL,
|
||||
PANGO_TYPE_FONT_DESCRIPTION,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_FAMILY] =
|
||||
g_param_spec_string ("family",
|
||||
P_("Font family"),
|
||||
P_("Name of the font family, e.g. Sans, Helvetica, Times, Monospace"),
|
||||
g_param_spec_string ("family", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_STYLE] =
|
||||
g_param_spec_enum ("style",
|
||||
P_("Font style"),
|
||||
P_("Font style"),
|
||||
g_param_spec_enum ("style", NULL, NULL,
|
||||
PANGO_TYPE_STYLE,
|
||||
PANGO_STYLE_NORMAL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_VARIANT] =
|
||||
g_param_spec_enum ("variant",
|
||||
P_("Font variant"),
|
||||
P_("Font variant"),
|
||||
g_param_spec_enum ("variant", NULL, NULL,
|
||||
PANGO_TYPE_VARIANT,
|
||||
PANGO_VARIANT_NORMAL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_WEIGHT] =
|
||||
g_param_spec_int ("weight",
|
||||
P_("Font weight"),
|
||||
P_("Font weight"),
|
||||
g_param_spec_int ("weight", NULL, NULL,
|
||||
0, G_MAXINT,
|
||||
PANGO_WEIGHT_NORMAL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_STRETCH] =
|
||||
g_param_spec_enum ("stretch",
|
||||
P_("Font stretch"),
|
||||
P_("Font stretch"),
|
||||
g_param_spec_enum ("stretch", NULL, NULL,
|
||||
PANGO_TYPE_STRETCH,
|
||||
PANGO_STRETCH_NORMAL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_SIZE] =
|
||||
g_param_spec_int ("size",
|
||||
P_("Font size"),
|
||||
P_("Font size"),
|
||||
g_param_spec_int ("size", NULL, NULL,
|
||||
0, G_MAXINT,
|
||||
0,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_SIZE_POINTS] =
|
||||
g_param_spec_double ("size-points",
|
||||
P_("Font points"),
|
||||
P_("Font size in points"),
|
||||
g_param_spec_double ("size-points", NULL, NULL,
|
||||
0.0, G_MAXDOUBLE,
|
||||
0.0,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_SCALE] =
|
||||
g_param_spec_double ("scale",
|
||||
P_("Font scale"),
|
||||
P_("Font scaling factor"),
|
||||
g_param_spec_double ("scale", NULL, NULL,
|
||||
0.0, G_MAXDOUBLE,
|
||||
1.0,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_RISE] =
|
||||
g_param_spec_int ("rise",
|
||||
P_("Rise"),
|
||||
P_("Offset of text above the baseline (below the baseline if rise is negative)"),
|
||||
g_param_spec_int ("rise", NULL, NULL,
|
||||
-G_MAXINT, G_MAXINT,
|
||||
0,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
|
||||
text_cell_renderer_props[PROP_STRIKETHROUGH] =
|
||||
g_param_spec_boolean ("strikethrough",
|
||||
P_("Strikethrough"),
|
||||
P_("Whether to strike through the text"),
|
||||
g_param_spec_boolean ("strikethrough", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_UNDERLINE] =
|
||||
g_param_spec_enum ("underline",
|
||||
P_("Underline"),
|
||||
P_("Style of underline for this text"),
|
||||
g_param_spec_enum ("underline", NULL, NULL,
|
||||
PANGO_TYPE_UNDERLINE,
|
||||
PANGO_UNDERLINE_NONE,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
text_cell_renderer_props[PROP_LANGUAGE] =
|
||||
g_param_spec_string ("language",
|
||||
P_("Language"),
|
||||
P_("The language this text is in, as an ISO code. "
|
||||
"Pango can use this as a hint when rendering the text. "
|
||||
"If you don’t understand this parameter, you probably don’t need it"),
|
||||
g_param_spec_string ("language", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
@@ -440,11 +392,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* for another way of making the text fit into a given width.
|
||||
*/
|
||||
text_cell_renderer_props[PROP_ELLIPSIZE] =
|
||||
g_param_spec_enum ("ellipsize",
|
||||
P_("Ellipsize"),
|
||||
P_("The preferred place to ellipsize the string, "
|
||||
"if the cell renderer does not have enough room "
|
||||
"to display the entire string"),
|
||||
g_param_spec_enum ("ellipsize", NULL, NULL,
|
||||
PANGO_TYPE_ELLIPSIZE_MODE,
|
||||
PANGO_ELLIPSIZE_NONE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -457,9 +405,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* request either 3 characters or the property value, whichever is greater.
|
||||
**/
|
||||
text_cell_renderer_props[PROP_WIDTH_CHARS] =
|
||||
g_param_spec_int ("width-chars",
|
||||
P_("Width In Characters"),
|
||||
P_("The desired width of the label, in characters"),
|
||||
g_param_spec_int ("width-chars", NULL, NULL,
|
||||
-1, G_MAXINT,
|
||||
-1,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -477,9 +423,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* have received their natural width.
|
||||
**/
|
||||
text_cell_renderer_props[PROP_MAX_WIDTH_CHARS] =
|
||||
g_param_spec_int ("max-width-chars",
|
||||
P_("Maximum Width In Characters"),
|
||||
P_("The maximum width of the cell, in characters"),
|
||||
g_param_spec_int ("max-width-chars", NULL, NULL,
|
||||
-1, G_MAXINT,
|
||||
-1,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -492,11 +436,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* This property has no effect unless the wrap-width property is set.
|
||||
*/
|
||||
text_cell_renderer_props[PROP_WRAP_MODE] =
|
||||
g_param_spec_enum ("wrap-mode",
|
||||
P_("Wrap mode"),
|
||||
P_("How to break the string into multiple lines, "
|
||||
"if the cell renderer does not have enough room "
|
||||
"to display the entire string"),
|
||||
g_param_spec_enum ("wrap-mode", NULL, NULL,
|
||||
PANGO_TYPE_WRAP_MODE,
|
||||
PANGO_WRAP_CHAR,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -509,9 +449,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* Setting wrap-width to -1 turns wrapping off.
|
||||
*/
|
||||
text_cell_renderer_props[PROP_WRAP_WIDTH] =
|
||||
g_param_spec_int ("wrap-width",
|
||||
P_("Wrap width"),
|
||||
P_("The width at which the text is wrapped"),
|
||||
g_param_spec_int ("wrap-width", NULL, NULL,
|
||||
-1, G_MAXINT,
|
||||
-1,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -526,9 +464,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* on the other hand, sets the horizontal alignment of the whole text.
|
||||
*/
|
||||
text_cell_renderer_props[PROP_ALIGN] =
|
||||
g_param_spec_enum ("alignment",
|
||||
P_("Alignment"),
|
||||
P_("How to align the lines"),
|
||||
g_param_spec_enum ("alignment", NULL, NULL,
|
||||
PANGO_TYPE_ALIGNMENT,
|
||||
PANGO_ALIGN_LEFT,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
@@ -540,9 +476,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
* `GtkCellRendererText:editable` is %TRUE and the cell is empty.
|
||||
*/
|
||||
text_cell_renderer_props[PROP_PLACEHOLDER_TEXT] =
|
||||
g_param_spec_string ("placeholder-text",
|
||||
P_("Placeholder text"),
|
||||
P_("Text rendered when an editable cell is empty"),
|
||||
g_param_spec_string ("placeholder-text", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
@@ -550,69 +484,37 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
|
||||
#define ADD_SET_PROP(propname, propval, nick, blurb) text_cell_renderer_props[propval] = g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE)
|
||||
|
||||
ADD_SET_PROP ("background-set", PROP_BACKGROUND_SET,
|
||||
P_("Background set"),
|
||||
P_("Whether this tag affects the background color"));
|
||||
ADD_SET_PROP ("background-set", PROP_BACKGROUND_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("foreground-set", PROP_FOREGROUND_SET,
|
||||
P_("Foreground set"),
|
||||
P_("Whether this tag affects the foreground color"));
|
||||
ADD_SET_PROP ("foreground-set", PROP_FOREGROUND_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("editable-set", PROP_EDITABLE_SET,
|
||||
P_("Editability set"),
|
||||
P_("Whether this tag affects text editability"));
|
||||
ADD_SET_PROP ("editable-set", PROP_EDITABLE_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("family-set", PROP_FAMILY_SET,
|
||||
P_("Font family set"),
|
||||
P_("Whether this tag affects the font family"));
|
||||
ADD_SET_PROP ("family-set", PROP_FAMILY_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("style-set", PROP_STYLE_SET,
|
||||
P_("Font style set"),
|
||||
P_("Whether this tag affects the font style"));
|
||||
ADD_SET_PROP ("style-set", PROP_STYLE_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("variant-set", PROP_VARIANT_SET,
|
||||
P_("Font variant set"),
|
||||
P_("Whether this tag affects the font variant"));
|
||||
ADD_SET_PROP ("variant-set", PROP_VARIANT_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("weight-set", PROP_WEIGHT_SET,
|
||||
P_("Font weight set"),
|
||||
P_("Whether this tag affects the font weight"));
|
||||
ADD_SET_PROP ("weight-set", PROP_WEIGHT_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("stretch-set", PROP_STRETCH_SET,
|
||||
P_("Font stretch set"),
|
||||
P_("Whether this tag affects the font stretch"));
|
||||
ADD_SET_PROP ("stretch-set", PROP_STRETCH_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("size-set", PROP_SIZE_SET,
|
||||
P_("Font size set"),
|
||||
P_("Whether this tag affects the font size"));
|
||||
ADD_SET_PROP ("size-set", PROP_SIZE_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("scale-set", PROP_SCALE_SET,
|
||||
P_("Font scale set"),
|
||||
P_("Whether this tag scales the font size by a factor"));
|
||||
ADD_SET_PROP ("scale-set", PROP_SCALE_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("rise-set", PROP_RISE_SET,
|
||||
P_("Rise set"),
|
||||
P_("Whether this tag affects the rise"));
|
||||
ADD_SET_PROP ("rise-set", PROP_RISE_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("strikethrough-set", PROP_STRIKETHROUGH_SET,
|
||||
P_("Strikethrough set"),
|
||||
P_("Whether this tag affects strikethrough"));
|
||||
ADD_SET_PROP ("strikethrough-set", PROP_STRIKETHROUGH_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("underline-set", PROP_UNDERLINE_SET,
|
||||
P_("Underline set"),
|
||||
P_("Whether this tag affects underlining"));
|
||||
ADD_SET_PROP ("underline-set", PROP_UNDERLINE_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("language-set", PROP_LANGUAGE_SET,
|
||||
P_("Language set"),
|
||||
P_("Whether this tag affects the language the text is rendered as"));
|
||||
ADD_SET_PROP ("language-set", PROP_LANGUAGE_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("ellipsize-set", PROP_ELLIPSIZE_SET,
|
||||
P_("Ellipsize set"),
|
||||
P_("Whether this tag affects the ellipsize mode"));
|
||||
ADD_SET_PROP ("ellipsize-set", PROP_ELLIPSIZE_SET, NULL, NULL);
|
||||
|
||||
ADD_SET_PROP ("align-set", PROP_ALIGN_SET,
|
||||
P_("Align set"),
|
||||
P_("Whether this tag affects the alignment mode"));
|
||||
ADD_SET_PROP ("align-set", PROP_ALIGN_SET, NULL, NULL);
|
||||
|
||||
g_object_class_install_properties (object_class, LAST_PROP, text_cell_renderer_props);
|
||||
|
||||
|
||||
@@ -192,33 +192,25 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ACTIVE,
|
||||
g_param_spec_boolean ("active",
|
||||
P_("Toggle state"),
|
||||
P_("The toggle state of the button"),
|
||||
g_param_spec_boolean ("active", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_INCONSISTENT,
|
||||
g_param_spec_boolean ("inconsistent",
|
||||
P_("Inconsistent state"),
|
||||
P_("The inconsistent state of the button"),
|
||||
g_param_spec_boolean ("inconsistent", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ACTIVATABLE,
|
||||
g_param_spec_boolean ("activatable",
|
||||
P_("Activatable"),
|
||||
P_("The toggle button can be activated"),
|
||||
g_param_spec_boolean ("activatable", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_RADIO,
|
||||
g_param_spec_boolean ("radio",
|
||||
P_("Radio state"),
|
||||
P_("Draw the toggle button as a radio button"),
|
||||
g_param_spec_boolean ("radio", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
+5
-18
@@ -195,9 +195,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_MODEL,
|
||||
g_param_spec_object ("model",
|
||||
P_("CellView model"),
|
||||
P_("The model for cell view"),
|
||||
g_param_spec_object ("model", NULL, NULL,
|
||||
GTK_TYPE_TREE_MODEL,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -214,9 +212,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_CELL_AREA,
|
||||
g_param_spec_object ("cell-area",
|
||||
P_("Cell Area"),
|
||||
P_("The GtkCellArea used to layout cells"),
|
||||
g_param_spec_object ("cell-area", NULL, NULL,
|
||||
GTK_TYPE_CELL_AREA,
|
||||
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
@@ -238,10 +234,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_CELL_AREA_CONTEXT,
|
||||
g_param_spec_object ("cell-area-context",
|
||||
P_("Cell Area Context"),
|
||||
P_("The GtkCellAreaContext used to "
|
||||
"compute the geometry of the cell view"),
|
||||
g_param_spec_object ("cell-area-context", NULL, NULL,
|
||||
GTK_TYPE_CELL_AREA_CONTEXT,
|
||||
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
@@ -256,10 +249,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_DRAW_SENSITIVE,
|
||||
g_param_spec_boolean ("draw-sensitive",
|
||||
P_("Draw Sensitive"),
|
||||
P_("Whether to force cells to be drawn in a "
|
||||
"sensitive state"),
|
||||
g_param_spec_boolean ("draw-sensitive", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -275,10 +265,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_FIT_MODEL,
|
||||
g_param_spec_boolean ("fit-model",
|
||||
P_("Fit Model"),
|
||||
P_("Whether to request enough space for "
|
||||
"every row in the model"),
|
||||
g_param_spec_boolean ("fit-model", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
+1
-3
@@ -208,9 +208,7 @@ gtk_center_box_class_init (GtkCenterBoxClass *klass)
|
||||
* The position of the baseline aligned widget if extra space is available.
|
||||
*/
|
||||
g_object_class_install_property (object_class, PROP_BASELINE_POSITION,
|
||||
g_param_spec_enum ("baseline-position",
|
||||
P_("Baseline position"),
|
||||
P_("The position of the baseline aligned widgets if extra space is available"),
|
||||
g_param_spec_enum ("baseline-position", NULL, NULL,
|
||||
GTK_TYPE_BASELINE_POSITION,
|
||||
GTK_BASELINE_POSITION_CENTER,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
+6
-18
@@ -578,9 +578,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
|
||||
* the check button and the indicator CSS node.
|
||||
*/
|
||||
props[PROP_ACTIVE] =
|
||||
g_param_spec_boolean ("active",
|
||||
P_("Active"),
|
||||
P_("If the toggle button should be pressed in"),
|
||||
g_param_spec_boolean ("active", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -590,9 +588,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
|
||||
* The check button whose group this widget belongs to.
|
||||
*/
|
||||
props[PROP_GROUP] =
|
||||
g_param_spec_object ("group",
|
||||
P_("Group"),
|
||||
P_("The check button whose group this widget belongs to."),
|
||||
g_param_spec_object ("group", NULL, NULL,
|
||||
GTK_TYPE_CHECK_BUTTON,
|
||||
GTK_PARAM_WRITABLE);
|
||||
|
||||
@@ -602,9 +598,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
|
||||
* Text of the label inside the check button, if it contains a label widget.
|
||||
*/
|
||||
props[PROP_LABEL] =
|
||||
g_param_spec_string ("label",
|
||||
P_("Label"),
|
||||
P_("Text of the label widget inside the button, if the button contains a label widget"),
|
||||
g_param_spec_string ("label", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -617,9 +611,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
|
||||
* not the semantics of the button.
|
||||
*/
|
||||
props[PROP_INCONSISTENT] =
|
||||
g_param_spec_boolean ("inconsistent",
|
||||
P_("Inconsistent"),
|
||||
P_("If the check button is in an “in between” state"),
|
||||
g_param_spec_boolean ("inconsistent", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -630,9 +622,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
|
||||
* character is to be used as mnemonic.
|
||||
*/
|
||||
props[PROP_USE_UNDERLINE] =
|
||||
g_param_spec_boolean ("use-underline",
|
||||
P_("Use underline"),
|
||||
P_("If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key"),
|
||||
g_param_spec_boolean ("use-underline", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -644,9 +634,7 @@ gtk_check_button_class_init (GtkCheckButtonClass *class)
|
||||
* Since: 4.8
|
||||
*/
|
||||
props[PROP_CHILD] =
|
||||
g_param_spec_object ("child",
|
||||
P_("Child"),
|
||||
P_("The child widget"),
|
||||
g_param_spec_object ("child", NULL, NULL,
|
||||
GTK_TYPE_WIDGET,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
|
||||
@@ -175,9 +175,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_TITLE,
|
||||
g_param_spec_string ("title",
|
||||
P_("Title"),
|
||||
P_("The title of the color selection dialog"),
|
||||
g_param_spec_string ("title", NULL, NULL,
|
||||
_("Pick a Color"),
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -236,8 +234,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_SHOW_EDITOR,
|
||||
g_param_spec_boolean ("show-editor", P_("Show Editor"),
|
||||
P_("Whether to show the color editor right away"),
|
||||
g_param_spec_boolean ("show-editor", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -248,8 +245,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_MODAL,
|
||||
g_param_spec_boolean ("modal", P_("Modal"),
|
||||
P_("Whether the dialog is modal"),
|
||||
g_param_spec_boolean ("modal", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
@@ -61,9 +61,7 @@ gtk_color_chooser_default_init (GtkColorChooserInterface *iface)
|
||||
* programmatically.
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_boxed ("rgba",
|
||||
P_("Color"),
|
||||
P_("Current color, as a GdkRGBA"),
|
||||
g_param_spec_boxed ("rgba", NULL, NULL,
|
||||
GDK_TYPE_RGBA,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
@@ -80,9 +78,7 @@ gtk_color_chooser_default_init (GtkColorChooserInterface *iface)
|
||||
* over a non-uniform background (like a checkerboard pattern).
|
||||
*/
|
||||
g_object_interface_install_property (iface,
|
||||
g_param_spec_boolean ("use-alpha",
|
||||
P_("Use alpha"),
|
||||
P_("Whether alpha should be shown"),
|
||||
g_param_spec_boolean ("use-alpha", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ gtk_color_chooser_dialog_class_init (GtkColorChooserDialogClass *class)
|
||||
g_object_class_override_property (object_class, PROP_RGBA, "rgba");
|
||||
g_object_class_override_property (object_class, PROP_USE_ALPHA, "use-alpha");
|
||||
g_object_class_install_property (object_class, PROP_SHOW_EDITOR,
|
||||
g_param_spec_boolean ("show-editor", P_("Show editor"), P_("Show editor"),
|
||||
g_param_spec_boolean ("show-editor", NULL, NULL,
|
||||
FALSE, GTK_PARAM_READWRITE));
|
||||
|
||||
/* Bind class to template
|
||||
|
||||
@@ -718,7 +718,7 @@ gtk_color_chooser_widget_class_init (GtkColorChooserWidgetClass *class)
|
||||
* It can be set to switch the color chooser into single-color editing mode.
|
||||
*/
|
||||
g_object_class_install_property (object_class, PROP_SHOW_EDITOR,
|
||||
g_param_spec_boolean ("show-editor", P_("Show editor"), P_("Show editor"),
|
||||
g_param_spec_boolean ("show-editor", NULL, NULL,
|
||||
FALSE, GTK_PARAM_READWRITE));
|
||||
|
||||
gtk_widget_class_set_css_name (widget_class, I_("colorchooser"));
|
||||
|
||||
@@ -401,11 +401,6 @@ gtk_color_editor_init (GtkColorEditor *editor)
|
||||
g_type_ensure (GTK_TYPE_COLOR_SWATCH);
|
||||
gtk_widget_init_template (GTK_WIDGET (editor));
|
||||
|
||||
if (gtk_widget_get_direction (editor->h_slider) == GTK_TEXT_DIR_RTL)
|
||||
gtk_widget_add_css_class (editor->h_slider, "marks-before");
|
||||
else
|
||||
gtk_widget_add_css_class (editor->h_slider, "marks-after");
|
||||
|
||||
/* Create the scaled popup adjustments manually here because connecting user data is not
|
||||
* supported by template GtkBuilder xml (it would be possible to set this up in the xml
|
||||
* but require 4 separate callbacks and would be rather ugly).
|
||||
|
||||
+3
-9
@@ -487,27 +487,21 @@ gtk_color_plane_class_init (GtkColorPlaneClass *class)
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_H_ADJUSTMENT,
|
||||
g_param_spec_object ("h-adjustment",
|
||||
"Hue Adjustment",
|
||||
"Hue Adjustment",
|
||||
g_param_spec_object ("h-adjustment", NULL, NULL,
|
||||
GTK_TYPE_ADJUSTMENT,
|
||||
GTK_PARAM_WRITABLE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_S_ADJUSTMENT,
|
||||
g_param_spec_object ("s-adjustment",
|
||||
"Saturation Adjustment",
|
||||
"Saturation Adjustment",
|
||||
g_param_spec_object ("s-adjustment", NULL, NULL,
|
||||
GTK_TYPE_ADJUSTMENT,
|
||||
GTK_PARAM_WRITABLE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_V_ADJUSTMENT,
|
||||
g_param_spec_object ("v-adjustment",
|
||||
"Value Adjustment",
|
||||
"Value Adjustment",
|
||||
g_param_spec_object ("v-adjustment", NULL, NULL,
|
||||
GTK_TYPE_ADJUSTMENT,
|
||||
GTK_PARAM_WRITABLE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
+1
-1
@@ -283,7 +283,7 @@ gtk_color_scale_class_init (GtkColorScaleClass *class)
|
||||
object_class->set_property = scale_set_property;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_SCALE_TYPE,
|
||||
g_param_spec_int ("scale-type", P_("Scale type"), P_("Scale type"),
|
||||
g_param_spec_int ("scale-type", NULL, NULL,
|
||||
0, 1, 0,
|
||||
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||
}
|
||||
|
||||
@@ -509,19 +509,19 @@ gtk_color_swatch_class_init (GtkColorSwatchClass *class)
|
||||
widget_class->state_flags_changed = swatch_state_flags_changed;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_RGBA,
|
||||
g_param_spec_boxed ("rgba", P_("RGBA Color"), P_("Color as RGBA"),
|
||||
g_param_spec_boxed ("rgba", NULL, NULL,
|
||||
GDK_TYPE_RGBA, GTK_PARAM_READWRITE));
|
||||
g_object_class_install_property (object_class, PROP_SELECTABLE,
|
||||
g_param_spec_boolean ("selectable", P_("Selectable"), P_("Whether the swatch is selectable"),
|
||||
g_param_spec_boolean ("selectable", NULL, NULL,
|
||||
TRUE, GTK_PARAM_READWRITE));
|
||||
g_object_class_install_property (object_class, PROP_HAS_MENU,
|
||||
g_param_spec_boolean ("has-menu", P_("Has Menu"), P_("Whether the swatch should offer customization"),
|
||||
g_param_spec_boolean ("has-menu", NULL, NULL,
|
||||
TRUE, GTK_PARAM_READWRITE));
|
||||
g_object_class_install_property (object_class, PROP_CAN_DROP,
|
||||
g_param_spec_boolean ("can-drop", P_("Can Drop"), P_("Whether the swatch should accept drops"),
|
||||
g_param_spec_boolean ("can-drop", NULL, NULL,
|
||||
FALSE, GTK_PARAM_READWRITE));
|
||||
g_object_class_install_property (object_class, PROP_CAN_DRAG,
|
||||
g_param_spec_boolean ("can-drag", P_("Can Drag"), P_("Whether the swatch should allow drags"),
|
||||
g_param_spec_boolean ("can-drag", NULL, NULL,
|
||||
TRUE, GTK_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,9 @@ struct _GtkColumnListItemFactoryClass
|
||||
|
||||
G_DEFINE_TYPE (GtkColumnListItemFactory, gtk_column_list_item_factory, GTK_TYPE_LIST_ITEM_FACTORY)
|
||||
|
||||
#define ancestor_class(T_N) ((T_N##Class *)gtk_column_list_item_factory_parent_class)
|
||||
#define parent_class ancestor_class(GtkListItemFactory)
|
||||
|
||||
static void
|
||||
gtk_column_list_item_factory_setup (GtkListItemFactory *factory,
|
||||
GtkListItemWidget *widget,
|
||||
@@ -54,7 +57,7 @@ gtk_column_list_item_factory_setup (GtkListItemFactory *factory,
|
||||
gtk_widget_set_layout_manager (GTK_WIDGET (widget),
|
||||
gtk_column_view_layout_new (self->view));
|
||||
|
||||
GTK_LIST_ITEM_FACTORY_CLASS (gtk_column_list_item_factory_parent_class)->setup (factory, widget, list_item);
|
||||
parent_class->setup (factory, widget, list_item);
|
||||
|
||||
columns = gtk_column_view_get_columns (self->view);
|
||||
|
||||
@@ -76,13 +79,14 @@ gtk_column_list_item_factory_teardown (GtkListItemFactory *factory,
|
||||
GtkListItemWidget *widget,
|
||||
GtkListItem *list_item)
|
||||
{
|
||||
GtkWidget *w = GTK_WIDGET (widget);
|
||||
GtkWidget *child;
|
||||
|
||||
GTK_LIST_ITEM_FACTORY_CLASS (gtk_column_list_item_factory_parent_class)->teardown (factory, widget, list_item);
|
||||
parent_class->teardown (factory, widget, list_item);
|
||||
|
||||
while ((child = gtk_widget_get_first_child (GTK_WIDGET (widget))))
|
||||
while ((child = gtk_widget_get_first_child (w)))
|
||||
{
|
||||
gtk_list_item_widget_remove_child (GTK_LIST_ITEM_WIDGET (widget), child);
|
||||
gtk_list_item_widget_remove_child (widget, child);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,11 +98,12 @@ gtk_column_list_item_factory_update (GtkListItemFactory *factory,
|
||||
gpointer item,
|
||||
gboolean selected)
|
||||
{
|
||||
GtkWidget *w = GTK_WIDGET (widget);
|
||||
GtkWidget *child;
|
||||
|
||||
GTK_LIST_ITEM_FACTORY_CLASS (gtk_column_list_item_factory_parent_class)->update (factory, widget, list_item, position, item, selected);
|
||||
parent_class->update (factory, widget, list_item, position, item, selected);
|
||||
|
||||
for (child = gtk_widget_get_first_child (GTK_WIDGET (widget));
|
||||
for (child = gtk_widget_get_first_child (w);
|
||||
child;
|
||||
child = gtk_widget_get_next_sibling (child))
|
||||
{
|
||||
@@ -142,7 +147,7 @@ gtk_column_list_item_factory_add_column (GtkColumnListItemFactory *factory,
|
||||
GtkWidget *cell;
|
||||
|
||||
cell = gtk_column_view_cell_new (column);
|
||||
gtk_list_item_widget_add_child (GTK_LIST_ITEM_WIDGET (list_item), GTK_WIDGET (cell));
|
||||
gtk_list_item_widget_add_child (list_item, cell);
|
||||
gtk_list_item_widget_update (GTK_LIST_ITEM_WIDGET (cell),
|
||||
gtk_list_item_widget_get_position (list_item),
|
||||
gtk_list_item_widget_get_item (list_item),
|
||||
|
||||
+8
-24
@@ -678,9 +678,7 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
* The list of columns.
|
||||
*/
|
||||
properties[PROP_COLUMNS] =
|
||||
g_param_spec_object ("columns",
|
||||
P_("Columns"),
|
||||
P_("List of columns"),
|
||||
g_param_spec_object ("columns", NULL, NULL,
|
||||
G_TYPE_LIST_MODEL,
|
||||
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -690,9 +688,7 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
* Model for the items displayed.
|
||||
*/
|
||||
properties[PROP_MODEL] =
|
||||
g_param_spec_object ("model",
|
||||
P_("Model"),
|
||||
P_("Model for the items displayed"),
|
||||
g_param_spec_object ("model", NULL, NULL,
|
||||
GTK_TYPE_SELECTION_MODEL,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -702,9 +698,7 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
* Show separators between rows.
|
||||
*/
|
||||
properties[PROP_SHOW_ROW_SEPARATORS] =
|
||||
g_param_spec_boolean ("show-row-separators",
|
||||
P_("Show row separators"),
|
||||
P_("Show separators between rows"),
|
||||
g_param_spec_boolean ("show-row-separators", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -714,9 +708,7 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
* Show separators between columns.
|
||||
*/
|
||||
properties[PROP_SHOW_COLUMN_SEPARATORS] =
|
||||
g_param_spec_boolean ("show-column-separators",
|
||||
P_("Show column separators"),
|
||||
P_("Show separators between columns"),
|
||||
g_param_spec_boolean ("show-column-separators", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -726,9 +718,7 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
* Sorter with the sorting choices of the user.
|
||||
*/
|
||||
properties[PROP_SORTER] =
|
||||
g_param_spec_object ("sorter",
|
||||
P_("Sorter"),
|
||||
P_("Sorter with sorting choices of the user"),
|
||||
g_param_spec_object ("sorter", NULL, NULL,
|
||||
GTK_TYPE_SORTER,
|
||||
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -738,9 +728,7 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
* Activate rows on single click and select them on hover.
|
||||
*/
|
||||
properties[PROP_SINGLE_CLICK_ACTIVATE] =
|
||||
g_param_spec_boolean ("single-click-activate",
|
||||
P_("Single click activate"),
|
||||
P_("Activate rows on single click"),
|
||||
g_param_spec_boolean ("single-click-activate", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -750,9 +738,7 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
* Whether columns are reorderable.
|
||||
*/
|
||||
properties[PROP_REORDERABLE] =
|
||||
g_param_spec_boolean ("reorderable",
|
||||
P_("Reorderable"),
|
||||
P_("Whether columns are reorderable"),
|
||||
g_param_spec_boolean ("reorderable", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -762,9 +748,7 @@ gtk_column_view_class_init (GtkColumnViewClass *klass)
|
||||
* Allow rubberband selection.
|
||||
*/
|
||||
properties[PROP_ENABLE_RUBBERBAND] =
|
||||
g_param_spec_boolean ("enable-rubberband",
|
||||
P_("Enable rubberband selection"),
|
||||
P_("Allow selecting items by dragging with the mouse"),
|
||||
g_param_spec_boolean ("enable-rubberband", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
|
||||
@@ -237,9 +237,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* The `GtkColumnView` this column is a part of.
|
||||
*/
|
||||
properties[PROP_COLUMN_VIEW] =
|
||||
g_param_spec_object ("column-view",
|
||||
P_("Column view"),
|
||||
P_("Column view this column is a part of"),
|
||||
g_param_spec_object ("column-view", NULL, NULL,
|
||||
GTK_TYPE_COLUMN_VIEW,
|
||||
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -249,9 +247,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* Factory for populating list items.
|
||||
*/
|
||||
properties[PROP_FACTORY] =
|
||||
g_param_spec_object ("factory",
|
||||
P_("Factory"),
|
||||
P_("Factory for populating list items"),
|
||||
g_param_spec_object ("factory", NULL, NULL,
|
||||
GTK_TYPE_LIST_ITEM_FACTORY,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -261,9 +257,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* Title displayed in the header.
|
||||
*/
|
||||
properties[PROP_TITLE] =
|
||||
g_param_spec_string ("title",
|
||||
P_("Title"),
|
||||
P_("Title displayed in the header"),
|
||||
g_param_spec_string ("title", NULL, NULL,
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
@@ -273,9 +267,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* Sorter for sorting items according to this column.
|
||||
*/
|
||||
properties[PROP_SORTER] =
|
||||
g_param_spec_object ("sorter",
|
||||
P_("Sorter"),
|
||||
P_("Sorter for sorting items according to this column"),
|
||||
g_param_spec_object ("sorter", NULL, NULL,
|
||||
GTK_TYPE_SORTER,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -285,9 +277,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* Whether this column is visible.
|
||||
*/
|
||||
properties[PROP_VISIBLE] =
|
||||
g_param_spec_boolean ("visible",
|
||||
P_("Visible"),
|
||||
P_("Whether this column is visible"),
|
||||
g_param_spec_boolean ("visible", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -297,9 +287,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* Menu model used to create the context menu for the column header.
|
||||
*/
|
||||
properties[PROP_HEADER_MENU] =
|
||||
g_param_spec_object ("header-menu",
|
||||
P_("Header menu"),
|
||||
P_("Menu to use on the title of this column"),
|
||||
g_param_spec_object ("header-menu", NULL, NULL,
|
||||
G_TYPE_MENU_MODEL,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -309,9 +297,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* Whether this column is resizable.
|
||||
*/
|
||||
properties[PROP_RESIZABLE] =
|
||||
g_param_spec_boolean ("resizable",
|
||||
P_("Resizable"),
|
||||
P_("Whether this column is resizable"),
|
||||
g_param_spec_boolean ("resizable", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -321,9 +307,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* Column gets share of extra width allocated to the view.
|
||||
*/
|
||||
properties[PROP_EXPAND] =
|
||||
g_param_spec_boolean ("expand",
|
||||
P_("Expand"),
|
||||
P_("column gets share of extra width"),
|
||||
g_param_spec_boolean ("expand", NULL, NULL,
|
||||
FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
@@ -334,9 +318,7 @@ gtk_column_view_column_class_init (GtkColumnViewColumnClass *klass)
|
||||
* regardless of the size of its content.
|
||||
*/
|
||||
properties[PROP_FIXED_WIDTH] =
|
||||
g_param_spec_int ("fixed-width",
|
||||
P_("Fixed width"),
|
||||
P_("Fixed width of this column"),
|
||||
g_param_spec_int ("fixed-width", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
|
||||
+11
-39
@@ -664,9 +664,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_MODEL,
|
||||
g_param_spec_object ("model",
|
||||
P_("ComboBox model"),
|
||||
P_("The model for the combo box"),
|
||||
g_param_spec_object ("model", NULL, NULL,
|
||||
GTK_TYPE_TREE_MODEL,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -683,9 +681,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ACTIVE,
|
||||
g_param_spec_int ("active",
|
||||
P_("Active item"),
|
||||
P_("The item which is currently active"),
|
||||
g_param_spec_int ("active", NULL, NULL,
|
||||
-1,
|
||||
G_MAXINT,
|
||||
-1,
|
||||
@@ -698,9 +694,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_HAS_FRAME,
|
||||
g_param_spec_boolean ("has-frame",
|
||||
P_("Has Frame"),
|
||||
P_("Whether the combo box draws a frame around the child"),
|
||||
g_param_spec_boolean ("has-frame", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -714,9 +708,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_POPUP_SHOWN,
|
||||
g_param_spec_boolean ("popup-shown",
|
||||
P_("Popup shown"),
|
||||
P_("Whether the combo’s dropdown is shown"),
|
||||
g_param_spec_boolean ("popup-shown", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READABLE));
|
||||
|
||||
@@ -729,9 +721,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_BUTTON_SENSITIVITY,
|
||||
g_param_spec_enum ("button-sensitivity",
|
||||
P_("Button Sensitivity"),
|
||||
P_("Whether the dropdown button is sensitive when the model is empty"),
|
||||
g_param_spec_enum ("button-sensitivity", NULL, NULL,
|
||||
GTK_TYPE_SENSITIVITY_TYPE,
|
||||
GTK_SENSITIVITY_AUTO,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
@@ -743,9 +733,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_HAS_ENTRY,
|
||||
g_param_spec_boolean ("has-entry",
|
||||
P_("Has Entry"),
|
||||
P_("Whether combo box has an entry"),
|
||||
g_param_spec_boolean ("has-entry", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
@@ -759,11 +747,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ENTRY_TEXT_COLUMN,
|
||||
g_param_spec_int ("entry-text-column",
|
||||
P_("Entry Text Column"),
|
||||
P_("The column in the combo box’s model to associate "
|
||||
"with strings from the entry if the combo was "
|
||||
"created with GtkComboBox:has-entry = %TRUE"),
|
||||
g_param_spec_int ("entry-text-column", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -775,10 +759,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ID_COLUMN,
|
||||
g_param_spec_int ("id-column",
|
||||
P_("ID Column"),
|
||||
P_("The column in the combo box’s model that provides "
|
||||
"string IDs for the values in the model"),
|
||||
g_param_spec_int ("id-column", NULL, NULL,
|
||||
-1, G_MAXINT, -1,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -789,10 +770,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_ACTIVE_ID,
|
||||
g_param_spec_string ("active-id",
|
||||
P_("Active id"),
|
||||
P_("The value of the id column "
|
||||
"for the active row"),
|
||||
g_param_spec_string ("active-id", NULL, NULL,
|
||||
NULL,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -804,11 +782,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_POPUP_FIXED_WIDTH,
|
||||
g_param_spec_boolean ("popup-fixed-width",
|
||||
P_("Popup Fixed Width"),
|
||||
P_("Whether the popup’s width should be a "
|
||||
"fixed width matching the allocated width "
|
||||
"of the combo box"),
|
||||
g_param_spec_boolean ("popup-fixed-width", NULL, NULL,
|
||||
TRUE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
@@ -819,9 +793,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_CHILD,
|
||||
g_param_spec_object ("child",
|
||||
P_("Child"),
|
||||
P_("The child_widget"),
|
||||
g_param_spec_object ("child", NULL, NULL,
|
||||
GTK_TYPE_WIDGET,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user