~smspillaz/xig/xig.disconnect-signals

« back to all changes in this revision

Viewing changes to src/xig-remote-client.c

  • Committer: Robert Ancell
  • Date: 2012-01-06 01:25:12 UTC
  • Revision ID: robert.ancell@canonical.com-20120106012512-gy8rmb2e3hxz9bbh
Make a common XigCodec class

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
    message.border_width = xig_window_get_border_width (child);
94
94
    message.override_redirect = xig_window_get_override_redirect (child);
95
95
 
96
 
    xig_server_codec_send_create_notify (XIG_SERVER_CODEC (client), &message);
 
96
    xig_codec_feed_create_notify (XIG_CODEC (client), &message);
97
97
}
98
98
 
99
99
static void
105
105
    message.event = xig_window_get_id (event);
106
106
    message.window = xig_window_get_id (window);
107
107
 
108
 
    xig_server_codec_send_destroy_notify (XIG_SERVER_CODEC (client), &message);
 
108
    xig_codec_feed_destroy_notify (XIG_CODEC (client), &message);
109
109
}
110
110
 
111
111
static void
130
130
    message.window = xig_window_get_id (window);
131
131
    message.from_configure = FALSE; // FIXME
132
132
 
133
 
    xig_server_codec_send_unmap_notify (XIG_SERVER_CODEC (client), &message);
 
133
    xig_codec_feed_unmap_notify (XIG_CODEC (client), &message);
134
134
}
135
135
 
136
136
static void
155
155
    message.window = xig_window_get_id (window);
156
156
    message.override_redirect = xig_window_get_override_redirect (event);
157
157
 
158
 
    xig_server_codec_send_map_notify (XIG_SERVER_CODEC (client), &message);
 
158
    xig_codec_feed_map_notify (XIG_CODEC (client), &message);
159
159
}
160
160
 
161
161
void
167
167
    message.parent = xig_window_get_id (xig_window_get_parent (window));
168
168
    message.window = xig_window_get_id (window);
169
169
 
170
 
    xig_server_codec_send_map_request (XIG_SERVER_CODEC (client), &message);
 
170
    xig_codec_feed_map_request (XIG_CODEC (client), &message);
171
171
}
172
172
 
173
173
static void
195
195
    message.y = xig_window_get_y (event);
196
196
    message.override_redirect = xig_window_get_override_redirect (event);
197
197
 
198
 
    xig_server_codec_send_reparent_notify (XIG_SERVER_CODEC (client), &message);
 
198
    xig_codec_feed_reparent_notify (XIG_CODEC (client), &message);
199
199
}
200
200
 
201
201
static void
229
229
    message.border_width = xig_window_get_border_width (event);
230
230
    message.override_redirect = xig_window_get_override_redirect (event);
231
231
 
232
 
    xig_server_codec_send_configure_notify (XIG_SERVER_CODEC (client), &message);
 
232
    xig_codec_feed_configure_notify (XIG_CODEC (client), &message);
233
233
}
234
234
 
235
235
void
249
249
    message.border_width = border_width;
250
250
    message.value_mask = value_mask;
251
251
 
252
 
    xig_server_codec_send_configure_request (XIG_SERVER_CODEC (client), &message);
 
252
    xig_codec_feed_configure_request (XIG_CODEC (client), &message);
253
253
}
254
254
 
255
255
static void
274
274
    message.window = xig_window_get_id (window);
275
275
    message.place = xig_window_get_is_on_bottom (event) ? 1 : 0;
276
276
 
277
 
    xig_server_codec_send_circulate_notify (XIG_SERVER_CODEC (client), &message);
 
277
    xig_codec_feed_circulate_notify (XIG_CODEC (client), &message);
278
278
}
279
279
 
280
280
void
287
287
    message.window = xig_window_get_id (window);
288
288
    message.place = place;
289
289
 
290
 
    xig_server_codec_send_circulate_request (XIG_SERVER_CODEC (client), &message);
 
290
    xig_codec_feed_circulate_request (XIG_CODEC (client), &message);
291
291
}
292
292
 
293
293
static void
313
313
    message.time = 0; // FIXME
314
314
    message.state = xig_window_get_property (window, name) ? 0 : 1;
315
315
 
316
 
    xig_server_codec_send_property_notify (XIG_SERVER_CODEC (client), &message);
 
316
    xig_codec_feed_property_notify (XIG_CODEC (client), &message);
317
317
}
318
318
 
319
319
static void
401
401
    message.sequence_number = sequence_number;
402
402
    message.data = data;
403
403
 
404
 
    xig_server_codec_send_error (XIG_SERVER_CODEC (client), &message);
 
404
    xig_codec_feed_error (XIG_CODEC (client), &message);
405
405
}
406
406
 
407
407
static gboolean
420
420
        return FALSE;
421
421
    }
422
422
    else
423
 
        xig_server_codec_feed_data (XIG_SERVER_CODEC (client), buffer, n_read);
 
423
        xig_codec_feed_data (XIG_CODEC (client), buffer, n_read);
424
424
 
425
425
    return TRUE;
426
426
}
427
427
 
428
428
static void 
429
 
xig_remote_client_write (XigServerCodec *codec, const guint8 *data, gsize data_length)
 
429
xig_remote_client_write (XigCodec *codec, const guint8 *data, gsize data_length)
430
430
{
431
431
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
432
432
    send (g_io_channel_unix_get_fd (client->priv->channel), data, data_length, 0);
433
433
}
434
434
 
435
435
static void
436
 
xig_remote_client_connect (XigServerCodec *codec, XigConnect *message)
 
436
xig_remote_client_connect (XigCodec *codec, XigConnect *message)
437
437
{
438
438
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
439
439
    XigServer *server = client->priv->server;
560
560
        }
561
561
    }
562
562
 
563
 
    xig_server_codec_send_success (codec, &reply);
564
 
  
 
563
    xig_codec_feed_success (XIG_CODEC (codec), &reply);
 
564
 
565
565
    g_free (reply.pixmap_formats);
566
566
    for (i = 0; i < reply.screens_length; i++)
567
567
    {
574
574
}
575
575
 
576
576
static void 
577
 
xig_remote_client_create_window (XigServerCodec *codec, XigCreateWindow *message)
 
577
xig_remote_client_create_window (XigCodec *codec, XigCreateWindow *message)
578
578
{
579
579
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
580
580
    GString *text;
714
714
}
715
715
 
716
716
static void 
717
 
xig_remote_client_change_window_attributes (XigServerCodec *codec, XigChangeWindowAttributes *message)
 
717
xig_remote_client_change_window_attributes (XigCodec *codec, XigChangeWindowAttributes *message)
718
718
{
719
719
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
720
720
    XigWindow *window;
768
768
}
769
769
 
770
770
static void 
771
 
xig_remote_client_get_window_attributes (XigServerCodec *codec, XigGetWindowAttributes *message)
 
771
xig_remote_client_get_window_attributes (XigCodec *codec, XigGetWindowAttributes *message)
772
772
{
773
773
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
774
774
    XigWindow *window;
805
805
        reply.all_event_masks |= xig_remote_client_get_window_events (c, window);
806
806
    }
807
807
 
808
 
    xig_server_codec_send_get_window_attributes_reply (codec, &reply);
 
808
    xig_codec_feed_get_window_attributes_reply (XIG_CODEC (codec), &reply);
809
809
}
810
810
 
811
811
static void 
812
 
xig_remote_client_destroy_window (XigServerCodec *codec, XigDestroyWindow *message)
 
812
xig_remote_client_destroy_window (XigCodec *codec, XigDestroyWindow *message)
813
813
{
814
814
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
815
815
    XigWindow *window;
825
825
}
826
826
 
827
827
static void 
828
 
xig_remote_client_destroy_subwindows (XigServerCodec *codec, XigDestroySubwindows *message)
 
828
xig_remote_client_destroy_subwindows (XigCodec *codec, XigDestroySubwindows *message)
829
829
{
830
830
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
831
831
    XigWindow *window;
841
841
}
842
842
 
843
843
static void 
844
 
xig_remote_client_change_save_set (XigServerCodec *codec, XigChangeSaveSet *message)
 
844
xig_remote_client_change_save_set (XigCodec *codec, XigChangeSaveSet *message)
845
845
{
846
846
}
847
847
 
848
848
static void 
849
 
xig_remote_client_reparent_window (XigServerCodec *codec, XigReparentWindow *message)
 
849
xig_remote_client_reparent_window (XigCodec *codec, XigReparentWindow *message)
850
850
{
851
851
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
852
852
    XigWindow *window, *parent;
874
874
}
875
875
 
876
876
static void
877
 
xig_remote_client_map_window (XigServerCodec *codec, XigMapWindow *message)
 
877
xig_remote_client_map_window (XigCodec *codec, XigMapWindow *message)
878
878
{
879
879
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
880
880
    XigWindow *window;
890
890
}
891
891
 
892
892
static void 
893
 
xig_remote_client_map_subwindows (XigServerCodec *codec, XigMapSubwindows *message)
 
893
xig_remote_client_map_subwindows (XigCodec *codec, XigMapSubwindows *message)
894
894
{
895
895
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
896
896
    XigWindow *window;
911
911
}
912
912
 
913
913
static void 
914
 
xig_remote_client_unmap_window (XigServerCodec *codec, XigUnmapWindow *message)
 
914
xig_remote_client_unmap_window (XigCodec *codec, XigUnmapWindow *message)
915
915
{
916
916
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
917
917
    XigWindow *window;
927
927
}
928
928
 
929
929
static void 
930
 
xig_remote_client_unmap_subwindows (XigServerCodec *codec, XigUnmapSubwindows *message)
 
930
xig_remote_client_unmap_subwindows (XigCodec *codec, XigUnmapSubwindows *message)
931
931
{
932
932
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
933
933
    XigWindow *window;
948
948
}
949
949
 
950
950
static void 
951
 
xig_remote_client_configure_window (XigServerCodec *codec, XigConfigureWindow *message)
 
951
xig_remote_client_configure_window (XigCodec *codec, XigConfigureWindow *message)
952
952
{
953
953
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
954
954
    XigWindow *window, *sibling = NULL;
1031
1031
}
1032
1032
 
1033
1033
static void 
1034
 
xig_remote_client_circulate_window (XigServerCodec *codec, XigCirculateWindow *message)
 
1034
xig_remote_client_circulate_window (XigCodec *codec, XigCirculateWindow *message)
1035
1035
{
1036
1036
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1037
1037
    XigWindow *window;
1056
1056
}
1057
1057
 
1058
1058
static void 
1059
 
xig_remote_client_get_geometry (XigServerCodec *codec, XigGetGeometry *message)
 
1059
xig_remote_client_get_geometry (XigCodec *codec, XigGetGeometry *message)
1060
1060
{
1061
1061
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1062
1062
    XigWindow *window;
1079
1079
    reply.height = xig_window_get_height (window);
1080
1080
    reply.border_width = xig_window_get_border_width (window);
1081
1081
 
1082
 
    xig_server_codec_send_get_geometry_reply (codec, &reply);
 
1082
    xig_codec_feed_get_geometry_reply (XIG_CODEC (codec), &reply);
1083
1083
}
1084
1084
 
1085
1085
static void 
1086
 
xig_remote_client_query_tree (XigServerCodec *codec, XigQueryTree *message)
 
1086
xig_remote_client_query_tree (XigCodec *codec, XigQueryTree *message)
1087
1087
{
1088
1088
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1089
1089
    XigWindow *window;
1110
1110
        reply.children[i] = xig_window_get_id (child);
1111
1111
    }
1112
1112
 
1113
 
    xig_server_codec_send_query_tree_reply (codec, &reply);
 
1113
    xig_codec_feed_query_tree_reply (XIG_CODEC (codec), &reply);
1114
1114
 
1115
1115
    g_free (reply.children);
1116
1116
}
1117
1117
 
1118
1118
static void 
1119
 
xig_remote_client_intern_atom (XigServerCodec *codec, XigInternAtom *message)
 
1119
xig_remote_client_intern_atom (XigCodec *codec, XigInternAtom *message)
1120
1120
{
1121
1121
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1122
1122
    XigInternAtomReply reply;
1124
1124
    reply.sequence_number = message->sequence_number;
1125
1125
    reply.atom = xig_server_intern_atom (client->priv->server, message->name, message->only_if_exists);
1126
1126
 
1127
 
    xig_server_codec_send_intern_atom_reply (codec, &reply);
 
1127
    xig_codec_feed_intern_atom_reply (XIG_CODEC (codec), &reply);
1128
1128
}
1129
1129
 
1130
1130
static void 
1131
 
xig_remote_client_get_atom_name (XigServerCodec *codec, XigGetAtomName *message)
 
1131
xig_remote_client_get_atom_name (XigCodec *codec, XigGetAtomName *message)
1132
1132
{
1133
1133
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1134
1134
    XigGetAtomNameReply reply;
1141
1141
        return;
1142
1142
    }
1143
1143
 
1144
 
    xig_server_codec_send_get_atom_name_reply (codec, &reply);
 
1144
    xig_codec_feed_get_atom_name_reply (XIG_CODEC (codec), &reply);
1145
1145
}
1146
1146
 
1147
1147
static void 
1148
 
xig_remote_client_change_property (XigServerCodec *codec, XigChangeProperty *message)
 
1148
xig_remote_client_change_property (XigCodec *codec, XigChangeProperty *message)
1149
1149
{
1150
1150
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1151
1151
    XigWindow *window;
1170
1170
        return;
1171
1171
    }
1172
1172
 
 
1173
    /* Check format is valid */
 
1174
    switch (message->data_format)
 
1175
    {
 
1176
    case 8:
 
1177
    case 16:
 
1178
    case 32:
 
1179
        break;
 
1180
    default:
 
1181
        send_error (client, Value, XIG_REQUEST_ChangeProperty, 0, message->sequence_number, message->data_format);
 
1182
        return;
 
1183
    }
 
1184
 
1173
1185
    switch (message->mode)
1174
1186
    {
1175
1187
    case XIG_CHANGE_PROPERTY_MODE_REPLACE:
1176
 
        xig_window_replace_property (window, name, type, message->format, message->data, message->length * (message->format / 8));
 
1188
        xig_window_replace_property (window, name, type, message->data_format, message->data, message->data_length * (message->data_format / 8));
1177
1189
        break;
1178
1190
    case XIG_CHANGE_PROPERTY_MODE_APPEND:
1179
1191
        // FIXME: Check property exists and type and format matches
1180
 
        xig_window_append_property (window, name, message->data, message->length * (message->format / 8));
 
1192
        xig_window_append_property (window, name, message->data, message->data_length);
1181
1193
        break;
1182
1194
    case XIG_CHANGE_PROPERTY_MODE_PREPEND:
1183
1195
        // FIXME: Check property exists and type and format matches
1184
 
        xig_window_prepend_property (window, name, message->data, message->length * (message->format / 8));
 
1196
        xig_window_prepend_property (window, name, message->data, message->data_length);
1185
1197
        break;
1186
1198
    default:
1187
1199
        send_error (client, Value, XIG_REQUEST_ChangeProperty, 0, message->sequence_number, message->mode);
1190
1202
}
1191
1203
 
1192
1204
static void 
1193
 
xig_remote_client_delete_property (XigServerCodec *codec, XigDeleteProperty *message)
 
1205
xig_remote_client_delete_property (XigCodec *codec, XigDeleteProperty *message)
1194
1206
{
1195
1207
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1196
1208
    XigWindow *window;
1213
1225
}
1214
1226
 
1215
1227
static void 
1216
 
xig_remote_client_get_property (XigServerCodec *codec, XigGetProperty *message)
 
1228
xig_remote_client_get_property (XigCodec *codec, XigGetProperty *message)
1217
1229
{
1218
1230
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1219
1231
    XigWindow *window;
1244
1256
    }
1245
1257
 
1246
1258
    reply.sequence_number = message->sequence_number;
1247
 
    reply.format = 0;
1248
1259
    reply.type = 0;
1249
1260
    reply.bytes_after = 0;
 
1261
    reply.value_format = 0;
1250
1262
    reply.value = NULL;
1251
1263
    reply.value_length = 0;
1252
1264
 
1256
1268
        /* If the type is wrong then return the correct type and size */
1257
1269
        if (type_name && strcmp (property->type, type_name) != 0)
1258
1270
        {
1259
 
            reply.format = property->format;
1260
1271
            reply.type = xig_server_get_atom_id (client->priv->server, property->type);
 
1272
            reply.value_format = property->format;
1261
1273
            reply.bytes_after = property->data_length;
1262
1274
        }
1263
1275
        else
1264
1276
        {
1265
1277
            gsize offset;
1266
1278
 
1267
 
            reply.format = property->format;
1268
1279
            reply.type = xig_server_get_atom_id (client->priv->server, property->type);
 
1280
            reply.value_format = property->format;
1269
1281
 
1270
1282
            /* Get the subset of the data requested */
1271
1283
            offset = MIN (property->data_length, 4 * message->long_offset);
1281
1293
        }
1282
1294
    }
1283
1295
 
1284
 
    xig_server_codec_send_get_property_reply (codec, &reply);
 
1296
    xig_codec_feed_get_property_reply (XIG_CODEC (codec), &reply);
1285
1297
 
1286
1298
    if (message->delete && reply.bytes_after == 0)
1287
1299
        xig_window_delete_property (window, name);
1288
1300
}
1289
1301
 
1290
1302
static void 
1291
 
xig_remote_client_list_properties (XigServerCodec *codec, XigListProperties *message)
 
1303
xig_remote_client_list_properties (XigCodec *codec, XigListProperties *message)
1292
1304
{
1293
1305
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1294
1306
    XigWindow *window;
1322
1334
        i++;
1323
1335
    }
1324
1336
 
1325
 
    xig_server_codec_send_list_properties_reply (codec, &reply);
 
1337
    xig_codec_feed_list_properties_reply (XIG_CODEC (codec), &reply);
1326
1338
                          
1327
1339
    g_free (reply.atoms);
1328
1340
}
1329
1341
 
1330
1342
static void
1331
 
xig_remote_client_set_selection_owner (XigServerCodec *codec, XigSetSelectionOwner *message)
 
1343
xig_remote_client_set_selection_owner (XigCodec *codec, XigSetSelectionOwner *message)
1332
1344
{
1333
1345
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1334
1346
    XigWindow *window = NULL;
1351
1363
}
1352
1364
 
1353
1365
static void
1354
 
xig_remote_client_get_selection_owner (XigServerCodec *codec, XigGetSelectionOwner *message)
 
1366
xig_remote_client_get_selection_owner (XigCodec *codec, XigGetSelectionOwner *message)
1355
1367
{
1356
1368
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1357
1369
    const gchar *name;
1370
1382
    reply.sequence_number = message->sequence_number;
1371
1383
    reply.owner = owner ? xig_window_get_id (owner) : XIG_WINDOW_ID_NONE;
1372
1384
 
1373
 
    xig_server_codec_send_get_selection_owner_reply (codec, &reply);
 
1385
    xig_codec_feed_get_selection_owner_reply (XIG_CODEC (codec), &reply);
1374
1386
}
1375
1387
 
1376
1388
static void
1377
 
xig_remote_client_convert_selection (XigServerCodec *codec, XigConvertSelection *message)
 
1389
xig_remote_client_convert_selection (XigCodec *codec, XigConvertSelection *message)
1378
1390
{
1379
1391
}
1380
1392
 
1381
1393
static void
1382
 
xig_remote_client_send_event (XigServerCodec *codec, XigSendEvent *message)
 
1394
xig_remote_client_send_event (XigCodec *codec, XigSendEvent *message)
1383
1395
{
1384
1396
    // FIXME:
1385
1397
}
1386
1398
 
1387
1399
static void
1388
 
xig_remote_client_grab_pointer (XigServerCodec *codec, XigGrabPointer *message)
 
1400
xig_remote_client_grab_pointer (XigCodec *codec, XigGrabPointer *message)
1389
1401
{
1390
1402
    XigGrabPointerReply reply;
1391
1403
 
1392
1404
    reply.sequence_number = message->sequence_number;
1393
1405
    reply.status = 0; // FIXME
1394
1406
 
1395
 
    xig_server_codec_send_grab_pointer_reply (codec, &reply);
1396
 
}
1397
 
 
1398
 
static void
1399
 
xig_remote_client_ungrab_pointer (XigServerCodec *codec, XigUngrabPointer *message)
1400
 
{
1401
 
}
1402
 
 
1403
 
static void
1404
 
xig_remote_client_grab_button (XigServerCodec *codec, XigGrabButton *message)
1405
 
{
1406
 
}
1407
 
 
1408
 
static void
1409
 
xig_remote_client_ungrab_button (XigServerCodec *codec, XigUngrabButton *message)
1410
 
{
1411
 
}
1412
 
 
1413
 
static void
1414
 
xig_remote_client_change_active_pointer_grab (XigServerCodec *codec, XigChangeActivePointerGrab *message)
1415
 
{
1416
 
}
1417
 
 
1418
 
static void
1419
 
xig_remote_client_grab_keyboard (XigServerCodec *codec, XigGrabKeyboard *message)
 
1407
    xig_codec_feed_grab_pointer_reply (XIG_CODEC (codec), &reply);
 
1408
}
 
1409
 
 
1410
static void
 
1411
xig_remote_client_ungrab_pointer (XigCodec *codec, XigUngrabPointer *message)
 
1412
{
 
1413
}
 
1414
 
 
1415
static void
 
1416
xig_remote_client_grab_button (XigCodec *codec, XigGrabButton *message)
 
1417
{
 
1418
}
 
1419
 
 
1420
static void
 
1421
xig_remote_client_ungrab_button (XigCodec *codec, XigUngrabButton *message)
 
1422
{
 
1423
}
 
1424
 
 
1425
static void
 
1426
xig_remote_client_change_active_pointer_grab (XigCodec *codec, XigChangeActivePointerGrab *message)
 
1427
{
 
1428
}
 
1429
 
 
1430
static void
 
1431
xig_remote_client_grab_keyboard (XigCodec *codec, XigGrabKeyboard *message)
1420
1432
{
1421
1433
    XigGrabKeyboardReply reply;
1422
1434
 
1423
1435
    reply.sequence_number = message->sequence_number;
1424
1436
    reply.status = 0; // FIXME
1425
1437
 
1426
 
    xig_server_codec_send_grab_keyboard_reply (codec, &reply);
 
1438
    xig_codec_feed_grab_keyboard_reply (XIG_CODEC (codec), &reply);
1427
1439
}
1428
1440
 
1429
1441
static void
1430
 
xig_remote_client_ungrab_keyboard (XigServerCodec *codec, XigUngrabKeyboard *message)
 
1442
xig_remote_client_ungrab_keyboard (XigCodec *codec, XigUngrabKeyboard *message)
1431
1443
{
1432
1444
}
1433
1445
  
1434
1446
static void
1435
 
xig_remote_client_grab_key (XigServerCodec *codec, XigGrabKey *message)
1436
 
{
1437
 
}
1438
 
 
1439
 
static void
1440
 
xig_remote_client_ungrab_key (XigServerCodec *codec, XigUngrabKey *message)
1441
 
{
1442
 
}
1443
 
 
1444
 
static void
1445
 
xig_remote_client_allow_events (XigServerCodec *codec, XigAllowEvents *message)
1446
 
{
1447
 
}
1448
 
 
1449
 
static void
1450
 
xig_remote_client_grab_server (XigServerCodec *codec, XigGrabServer *message)
1451
 
{
1452
 
}
1453
 
 
1454
 
static void
1455
 
xig_remote_client_ungrab_server (XigServerCodec *codec, XigUngrabServer *message)
1456
 
{
1457
 
}
1458
 
 
1459
 
static void
1460
 
xig_remote_client_query_pointer (XigServerCodec *codec, XigQueryPointer *message)
 
1447
xig_remote_client_grab_key (XigCodec *codec, XigGrabKey *message)
 
1448
{
 
1449
}
 
1450
 
 
1451
static void
 
1452
xig_remote_client_ungrab_key (XigCodec *codec, XigUngrabKey *message)
 
1453
{
 
1454
}
 
1455
 
 
1456
static void
 
1457
xig_remote_client_allow_events (XigCodec *codec, XigAllowEvents *message)
 
1458
{
 
1459
}
 
1460
 
 
1461
static void
 
1462
xig_remote_client_grab_server (XigCodec *codec, XigGrabServer *message)
 
1463
{
 
1464
}
 
1465
 
 
1466
static void
 
1467
xig_remote_client_ungrab_server (XigCodec *codec, XigUngrabServer *message)
 
1468
{
 
1469
}
 
1470
 
 
1471
static void
 
1472
xig_remote_client_query_pointer (XigCodec *codec, XigQueryPointer *message)
1461
1473
{
1462
1474
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1463
1475
    XigWindow *window;
1480
1492
    reply.win_y = 0; // FIXME
1481
1493
    reply.mask = 0x0000; // FIXME
1482
1494
 
1483
 
    xig_server_codec_send_query_pointer_reply (codec, &reply);
 
1495
    xig_codec_feed_query_pointer_reply (XIG_CODEC (codec), &reply);
1484
1496
}
1485
1497
 
1486
1498
static void
1487
 
xig_remote_client_get_motion_events (XigServerCodec *codec, XigGetMotionEvents *message)
 
1499
xig_remote_client_get_motion_events (XigCodec *codec, XigGetMotionEvents *message)
1488
1500
{
1489
1501
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1490
1502
    XigWindow *window;
1501
1513
    reply.events_length = 0; // FIXME
1502
1514
    reply.events = NULL; // FIXME
1503
1515
 
1504
 
    xig_server_codec_send_get_motion_events_reply (codec, &reply);
 
1516
    xig_codec_feed_get_motion_events_reply (XIG_CODEC (codec), &reply);
1505
1517
 
1506
1518
    g_free (reply.events);
1507
1519
}
1508
1520
 
1509
1521
static void
1510
 
xig_remote_client_translate_coordinates (XigServerCodec *codec, XigTranslateCoordinates *message)
 
1522
xig_remote_client_translate_coordinates (XigCodec *codec, XigTranslateCoordinates *message)
1511
1523
{
1512
1524
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1513
1525
    XigWindow *src_window, *dst_window;
1532
1544
    reply.dst_x = 0; // FIXME
1533
1545
    reply.dst_y = 0; // FIXME
1534
1546
 
1535
 
    xig_server_codec_send_translate_coordinates_reply (codec, &reply);
 
1547
    xig_codec_feed_translate_coordinates_reply (XIG_CODEC (codec), &reply);
1536
1548
}
1537
1549
 
1538
1550
static void
1539
 
xig_remote_client_warp_pointer (XigServerCodec *codec, XigWarpPointer *message)
 
1551
xig_remote_client_warp_pointer (XigCodec *codec, XigWarpPointer *message)
1540
1552
{
1541
1553
}
1542
1554
 
1543
1555
static void
1544
 
xig_remote_client_set_input_focus (XigServerCodec *codec, XigSetInputFocus *message)
 
1556
xig_remote_client_set_input_focus (XigCodec *codec, XigSetInputFocus *message)
1545
1557
{
1546
1558
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1547
1559
    XigWindow *window;
1557
1569
}
1558
1570
 
1559
1571
static void 
1560
 
xig_remote_client_get_input_focus (XigServerCodec *codec, XigGetInputFocus *message)
 
1572
xig_remote_client_get_input_focus (XigCodec *codec, XigGetInputFocus *message)
1561
1573
{
1562
1574
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);  
1563
1575
    XigWindow *focus;
1567
1579
    focus = xig_server_get_input_focus (client->priv->server, &reply.revert_to);
1568
1580
    reply.focus = focus ? xig_window_get_id (focus) : XIG_WINDOW_ID_NONE;
1569
1581
 
1570
 
    xig_server_codec_send_get_input_focus_reply (codec, &reply);
 
1582
    xig_codec_feed_get_input_focus_reply (XIG_CODEC (codec), &reply);
1571
1583
}
1572
1584
 
1573
1585
static void 
1574
 
xig_remote_client_query_keymap (XigServerCodec *codec, XigQueryKeymap *message)
 
1586
xig_remote_client_query_keymap (XigCodec *codec, XigQueryKeymap *message)
1575
1587
{
1576
1588
    XigQueryKeymapReply reply;
1577
1589
    int i;
1580
1592
    for (i = 0; i < 32; i++)
1581
1593
        reply.keys[i] = 0x00; // FIXME
1582
1594
 
1583
 
    xig_server_codec_send_query_keymap_reply (codec, &reply);
1584
 
}
1585
 
 
1586
 
static void 
1587
 
xig_remote_client_open_font (XigServerCodec *codec, XigOpenFont *message)
1588
 
{
1589
 
}
1590
 
 
1591
 
static void 
1592
 
xig_remote_client_close_font (XigServerCodec *codec, XigCloseFont *message)
1593
 
{
1594
 
}
1595
 
 
1596
 
static void 
1597
 
xig_remote_client_query_font (XigServerCodec *codec, XigQueryFont *message)
 
1595
    xig_codec_feed_query_keymap_reply (XIG_CODEC (codec), &reply);
 
1596
}
 
1597
 
 
1598
static void 
 
1599
xig_remote_client_open_font (XigCodec *codec, XigOpenFont *message)
 
1600
{
 
1601
}
 
1602
 
 
1603
static void 
 
1604
xig_remote_client_close_font (XigCodec *codec, XigCloseFont *message)
 
1605
{
 
1606
}
 
1607
 
 
1608
static void 
 
1609
xig_remote_client_query_font (XigCodec *codec, XigQueryFont *message)
1598
1610
{
1599
1611
    XigQueryFontReply reply;
1600
1612
  
1625
1637
    reply.char_infos_length = 0; // FIXME
1626
1638
    reply.char_infos = NULL; // FIXME
1627
1639
 
1628
 
    xig_server_codec_send_query_font_reply (codec, &reply);
 
1640
    xig_codec_feed_query_font_reply (XIG_CODEC (codec), &reply);
1629
1641
  
1630
1642
    g_free (reply.properties);
1631
1643
    g_free (reply.char_infos);
1632
1644
}
1633
1645
 
1634
1646
static void 
1635
 
xig_remote_client_query_text_extents (XigServerCodec *codec, XigQueryTextExtents *message)
 
1647
xig_remote_client_query_text_extents (XigCodec *codec, XigQueryTextExtents *message)
1636
1648
{
1637
1649
    XigQueryTextExtentsReply reply;
1638
1650
 
1643
1655
    reply.overall_ascent = 0; // FIXME
1644
1656
    reply.overall_descent = 0; // FIXME
1645
1657
    reply.overall_width = 0; // FIXME
1646
 
    reply.overall_height = 0; // FIXME
1647
1658
    reply.overall_left = 0; // FIXME
1648
1659
    reply.overall_right = 0; // FIXME
1649
1660
 
1650
 
    xig_server_codec_send_query_text_extents_reply (codec, &reply);
 
1661
    xig_codec_feed_query_text_extents_reply (XIG_CODEC (codec), &reply);
1651
1662
}
1652
1663
 
1653
1664
static void 
1654
 
xig_remote_client_list_fonts (XigServerCodec *codec, XigListFonts *message)
 
1665
xig_remote_client_list_fonts (XigCodec *codec, XigListFonts *message)
1655
1666
{
1656
1667
    XigListFontsReply reply;
1657
1668
 
1658
1669
    reply.sequence_number = message->sequence_number;
1659
1670
    reply.names = g_strsplit ("", " ", -1); // FIXME
1660
 
    reply.names_length = g_strv_length (reply.names);
1661
1671
 
1662
 
    xig_server_codec_send_list_fonts_reply (codec, &reply);
 
1672
    xig_codec_feed_list_fonts_reply (XIG_CODEC (codec), &reply);
1663
1673
 
1664
1674
    g_strfreev (reply.names);
1665
1675
}
1666
1676
 
1667
1677
static void
1668
 
xig_remote_client_list_fonts_with_info (XigServerCodec *codec, XigListFontsWithInfo *message)
 
1678
xig_remote_client_list_fonts_with_info (XigCodec *codec, XigListFontsWithInfo *message)
1669
1679
{
1670
1680
    // FIXME emit reply
1671
1681
}
1672
1682
 
1673
1683
static void
1674
 
xig_remote_client_set_font_path (XigServerCodec *codec, XigSetFontPath *message)
 
1684
xig_remote_client_set_font_path (XigCodec *codec, XigSetFontPath *message)
1675
1685
{
1676
1686
}
1677
1687
 
1678
1688
static void
1679
 
xig_remote_client_get_font_path (XigServerCodec *codec, XigGetFontPath *message)
 
1689
xig_remote_client_get_font_path (XigCodec *codec, XigGetFontPath *message)
1680
1690
{
1681
1691
    XigGetFontPathReply reply;
1682
1692
 
1683
1693
    reply.sequence_number = message->sequence_number;
1684
1694
    reply.path = g_strsplit ("", " ", -1); // FIXME
1685
 
    reply.path_length = g_strv_length (reply.path);
1686
1695
 
1687
 
    xig_server_codec_send_get_font_path_reply (codec, &reply);
 
1696
    xig_codec_feed_get_font_path_reply (XIG_CODEC (codec), &reply);
1688
1697
 
1689
1698
    g_strfreev (reply.path);
1690
1699
}
1691
1700
 
1692
1701
static void
1693
 
xig_remote_client_create_pixmap (XigServerCodec *codec, XigCreatePixmap *message)
 
1702
xig_remote_client_create_pixmap (XigCodec *codec, XigCreatePixmap *message)
1694
1703
{
1695
1704
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1696
1705
    XigPixmap *pixmap;
1714
1723
}
1715
1724
 
1716
1725
static void 
1717
 
xig_remote_client_free_pixmap (XigServerCodec *codec, XigFreePixmap *message)
 
1726
xig_remote_client_free_pixmap (XigCodec *codec, XigFreePixmap *message)
1718
1727
{
1719
1728
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
1720
1729
    XigPixmap *pixmap;
1730
1739
}
1731
1740
 
1732
1741
static void 
1733
 
xig_remote_client_create_gc (XigServerCodec *codec, XigCreateGC *message)
1734
 
{
1735
 
}
1736
 
 
1737
 
static void 
1738
 
xig_remote_client_change_gc (XigServerCodec *codec, XigChangeGC *message)
1739
 
{
1740
 
}
1741
 
 
1742
 
static void 
1743
 
xig_remote_client_copy_gc (XigServerCodec *codec, XigCopyGC *message)
1744
 
{
1745
 
}
1746
 
 
1747
 
static void 
1748
 
xig_remote_client_set_dashes (XigServerCodec *codec, XigSetDashes *message)
1749
 
{
1750
 
}
1751
 
 
1752
 
static void 
1753
 
xig_remote_client_set_clip_rectangles (XigServerCodec *codec, XigSetClipRectangles *message)
1754
 
{
1755
 
}
1756
 
 
1757
 
static void 
1758
 
xig_remote_client_free_gc (XigServerCodec *codec, XigFreeGC *message)
1759
 
{
1760
 
}
1761
 
 
1762
 
static void 
1763
 
xig_remote_client_clear_area (XigServerCodec *codec, XigClearArea *message)
1764
 
{
1765
 
}
1766
 
 
1767
 
static void 
1768
 
xig_remote_client_copy_area (XigServerCodec *codec, XigCopyArea *message)
1769
 
{
1770
 
}
1771
 
 
1772
 
static void 
1773
 
xig_remote_client_copy_plane (XigServerCodec *codec, XigCopyPlane *message)
1774
 
{
1775
 
}
1776
 
 
1777
 
static void
1778
 
xig_remote_client_poly_point (XigServerCodec *codec, XigPolyPoint *message)
1779
 
{
1780
 
}
1781
 
 
1782
 
static void
1783
 
xig_remote_client_poly_line (XigServerCodec *codec, XigPolyLine *message)
1784
 
{
1785
 
}
1786
 
 
1787
 
static void
1788
 
xig_remote_client_poly_segment (XigServerCodec *codec, XigPolySegment *message)
1789
 
{
1790
 
}
1791
 
 
1792
 
static void
1793
 
xig_remote_client_poly_rectangle (XigServerCodec *codec, XigPolyRectangle *message)
1794
 
{
1795
 
}
1796
 
 
1797
 
static void
1798
 
xig_remote_client_poly_arc (XigServerCodec *codec, XigPolyArc *message)
1799
 
{
1800
 
}
1801
 
 
1802
 
static void
1803
 
xig_remote_client_fill_poly (XigServerCodec *codec, XigFillPoly *message)
1804
 
{
1805
 
}
1806
 
 
1807
 
static void
1808
 
xig_remote_client_poly_fill_rectangle (XigServerCodec *codec, XigPolyFillRectangle *message)
1809
 
{
1810
 
}
1811
 
 
1812
 
static void
1813
 
xig_remote_client_poly_fill_arc (XigServerCodec *codec, XigPolyFillArc *message)
1814
 
{
1815
 
}
1816
 
 
1817
 
static void 
1818
 
xig_remote_client_put_image (XigServerCodec *codec, XigPutImage *message)
1819
 
{
1820
 
}
1821
 
 
1822
 
static void
1823
 
xig_remote_client_get_image (XigServerCodec *codec, XigGetImage *message)
 
1742
xig_remote_client_create_gc (XigCodec *codec, XigCreateGC *message)
 
1743
{
 
1744
}
 
1745
 
 
1746
static void 
 
1747
xig_remote_client_change_gc (XigCodec *codec, XigChangeGC *message)
 
1748
{
 
1749
}
 
1750
 
 
1751
static void 
 
1752
xig_remote_client_copy_gc (XigCodec *codec, XigCopyGC *message)
 
1753
{
 
1754
}
 
1755
 
 
1756
static void 
 
1757
xig_remote_client_set_dashes (XigCodec *codec, XigSetDashes *message)
 
1758
{
 
1759
}
 
1760
 
 
1761
static void 
 
1762
xig_remote_client_set_clip_rectangles (XigCodec *codec, XigSetClipRectangles *message)
 
1763
{
 
1764
}
 
1765
 
 
1766
static void 
 
1767
xig_remote_client_free_gc (XigCodec *codec, XigFreeGC *message)
 
1768
{
 
1769
}
 
1770
 
 
1771
static void 
 
1772
xig_remote_client_clear_area (XigCodec *codec, XigClearArea *message)
 
1773
{
 
1774
}
 
1775
 
 
1776
static void 
 
1777
xig_remote_client_copy_area (XigCodec *codec, XigCopyArea *message)
 
1778
{
 
1779
}
 
1780
 
 
1781
static void 
 
1782
xig_remote_client_copy_plane (XigCodec *codec, XigCopyPlane *message)
 
1783
{
 
1784
}
 
1785
 
 
1786
static void
 
1787
xig_remote_client_poly_point (XigCodec *codec, XigPolyPoint *message)
 
1788
{
 
1789
}
 
1790
 
 
1791
static void
 
1792
xig_remote_client_poly_line (XigCodec *codec, XigPolyLine *message)
 
1793
{
 
1794
}
 
1795
 
 
1796
static void
 
1797
xig_remote_client_poly_segment (XigCodec *codec, XigPolySegment *message)
 
1798
{
 
1799
}
 
1800
 
 
1801
static void
 
1802
xig_remote_client_poly_rectangle (XigCodec *codec, XigPolyRectangle *message)
 
1803
{
 
1804
}
 
1805
 
 
1806
static void
 
1807
xig_remote_client_poly_arc (XigCodec *codec, XigPolyArc *message)
 
1808
{
 
1809
}
 
1810
 
 
1811
static void
 
1812
xig_remote_client_fill_poly (XigCodec *codec, XigFillPoly *message)
 
1813
{
 
1814
}
 
1815
 
 
1816
static void
 
1817
xig_remote_client_poly_fill_rectangle (XigCodec *codec, XigPolyFillRectangle *message)
 
1818
{
 
1819
}
 
1820
 
 
1821
static void
 
1822
xig_remote_client_poly_fill_arc (XigCodec *codec, XigPolyFillArc *message)
 
1823
{
 
1824
}
 
1825
 
 
1826
static void 
 
1827
xig_remote_client_put_image (XigCodec *codec, XigPutImage *message)
 
1828
{
 
1829
}
 
1830
 
 
1831
static void
 
1832
xig_remote_client_get_image (XigCodec *codec, XigGetImage *message)
1824
1833
{
1825
1834
    XigGetImageReply reply;
1826
1835
 
1830
1839
    reply.data = NULL; // FIXME
1831
1840
    reply.data_length = 0; // FIXME
1832
1841
 
1833
 
    xig_server_codec_send_get_image_reply (codec, &reply);
1834
 
}
1835
 
 
1836
 
static void
1837
 
xig_remote_client_poly_text8 (XigServerCodec *codec, XigPolyText8 *message)
1838
 
{
1839
 
}
1840
 
 
1841
 
static void
1842
 
xig_remote_client_poly_text16 (XigServerCodec *codec, XigPolyText16 *message)
1843
 
{
1844
 
}
1845
 
 
1846
 
static void
1847
 
xig_remote_client_image_text8 (XigServerCodec *codec, XigImageText8 *message)
1848
 
{
1849
 
}
1850
 
 
1851
 
static void
1852
 
xig_remote_client_image_text16 (XigServerCodec *codec, XigImageText16 *message)
 
1842
    xig_codec_feed_get_image_reply (XIG_CODEC (codec), &reply);
 
1843
}
 
1844
 
 
1845
static void
 
1846
xig_remote_client_poly_text8 (XigCodec *codec, XigPolyText8 *message)
 
1847
{
 
1848
}
 
1849
 
 
1850
static void
 
1851
xig_remote_client_poly_text16 (XigCodec *codec, XigPolyText16 *message)
 
1852
{
 
1853
}
 
1854
 
 
1855
static void
 
1856
xig_remote_client_image_text8 (XigCodec *codec, XigImageText8 *message)
 
1857
{
 
1858
}
 
1859
 
 
1860
static void
 
1861
xig_remote_client_image_text16 (XigCodec *codec, XigImageText16 *message)
1853
1862
{
1854
1863
}
1855
1864
 
1856
1865
static void
1857
 
xig_remote_client_create_colormap (XigServerCodec *codec, XigCreateColormap *message)
1858
 
{
1859
 
}
1860
 
 
1861
 
static void
1862
 
xig_remote_client_free_colormap (XigServerCodec *codec, XigFreeColormap *message)
1863
 
{
1864
 
}
1865
 
 
1866
 
static void
1867
 
xig_remote_client_copy_colormap_and_free (XigServerCodec *codec, XigCopyColormapAndFree *message)
1868
 
{
1869
 
}
1870
 
 
1871
 
static void
1872
 
xig_remote_client_install_colormap (XigServerCodec *codec, XigInstallColormap *message)
1873
 
{
1874
 
}
1875
 
 
1876
 
static void
1877
 
xig_remote_client_uninstall_colormap (XigServerCodec *codec, XigUninstallColormap *message)
1878
 
{
1879
 
}
1880
 
 
1881
 
static void
1882
 
xig_remote_client_list_installed_colormaps (XigServerCodec *codec, XigListInstalledColormaps *message)
 
1866
xig_remote_client_create_colormap (XigCodec *codec, XigCreateColormap *message)
 
1867
{
 
1868
}
 
1869
 
 
1870
static void
 
1871
xig_remote_client_free_colormap (XigCodec *codec, XigFreeColormap *message)
 
1872
{
 
1873
}
 
1874
 
 
1875
static void
 
1876
xig_remote_client_copy_colormap_and_free (XigCodec *codec, XigCopyColormapAndFree *message)
 
1877
{
 
1878
}
 
1879
 
 
1880
static void
 
1881
xig_remote_client_install_colormap (XigCodec *codec, XigInstallColormap *message)
 
1882
{
 
1883
}
 
1884
 
 
1885
static void
 
1886
xig_remote_client_uninstall_colormap (XigCodec *codec, XigUninstallColormap *message)
 
1887
{
 
1888
}
 
1889
 
 
1890
static void
 
1891
xig_remote_client_list_installed_colormaps (XigCodec *codec, XigListInstalledColormaps *message)
1883
1892
{
1884
1893
    XigListInstalledColormapsReply reply;
1885
1894
 
1887
1896
    reply.cmaps_length = 0;
1888
1897
    reply.cmaps = NULL;
1889
1898
 
1890
 
    xig_server_codec_send_list_installed_colormaps_reply (codec, &reply);
 
1899
    xig_codec_feed_list_installed_colormaps_reply (XIG_CODEC (codec), &reply);
1891
1900
 
1892
1901
    g_free (reply.cmaps);
1893
1902
}
1894
1903
 
1895
1904
static void 
1896
 
xig_remote_client_alloc_color (XigServerCodec *codec, XigAllocColor *message)
 
1905
xig_remote_client_alloc_color (XigCodec *codec, XigAllocColor *message)
1897
1906
{
1898
1907
    XigAllocColorReply reply;
1899
1908
 
1903
1912
    reply.blue = message->blue;
1904
1913
    reply.pixel = (message->red >> 8) << 24 | (message->green >> 8) << 8 | (message->blue >> 8);
1905
1914
 
1906
 
    xig_server_codec_send_alloc_color_reply (codec, &reply);
 
1915
    xig_codec_feed_alloc_color_reply (XIG_CODEC (codec), &reply);
1907
1916
}
1908
1917
 
1909
1918
static void 
1910
 
xig_remote_client_alloc_named_color (XigServerCodec *codec, XigAllocNamedColor *message)
 
1919
xig_remote_client_alloc_named_color (XigCodec *codec, XigAllocNamedColor *message)
1911
1920
{
1912
1921
    XigAllocNamedColorReply reply;
1913
1922
 
1920
1929
    reply.visual_blue = 0; // FIXME
1921
1930
    reply.pixel = 0; // FIXME
1922
1931
 
1923
 
    xig_server_codec_send_alloc_named_color_reply (codec, &reply);
 
1932
    xig_codec_feed_alloc_named_color_reply (XIG_CODEC (codec), &reply);
1924
1933
}
1925
1934
 
1926
1935
static void
1927
 
xig_remote_client_alloc_color_cells (XigServerCodec *codec, XigAllocColorCells *message)
 
1936
xig_remote_client_alloc_color_cells (XigCodec *codec, XigAllocColorCells *message)
1928
1937
{
1929
1938
    XigAllocColorCellsReply reply;
1930
1939
 
1934
1943
    reply.masks_length = 0; // FIXME
1935
1944
    reply.masks = NULL; // FIXME
1936
1945
 
1937
 
    xig_server_codec_send_alloc_color_cells_reply (codec, &reply);
 
1946
    xig_codec_feed_alloc_color_cells_reply (XIG_CODEC (codec), &reply);
1938
1947
  
1939
1948
    g_free (reply.pixels);
1940
1949
    g_free (reply.masks);
1941
1950
}
1942
1951
 
1943
1952
static void
1944
 
xig_remote_client_alloc_color_planes (XigServerCodec *codec, XigAllocColorPlanes *message)
 
1953
xig_remote_client_alloc_color_planes (XigCodec *codec, XigAllocColorPlanes *message)
1945
1954
{
1946
1955
    XigAllocColorPlanesReply reply;
1947
1956
 
1952
1961
    reply.green_mask = 0x00000000; // FIXME
1953
1962
    reply.blue_mask = 0x00000000; // FIXME
1954
1963
 
1955
 
    xig_server_codec_send_alloc_color_planes_reply (codec, &reply);
 
1964
    xig_codec_feed_alloc_color_planes_reply (XIG_CODEC (codec), &reply);
1956
1965
  
1957
1966
    g_free (reply.pixels);
1958
1967
}
1959
1968
 
1960
1969
static void 
1961
 
xig_remote_client_free_colors (XigServerCodec *codec, XigFreeColors *message)
1962
 
{
1963
 
}
1964
 
 
1965
 
static void 
1966
 
xig_remote_client_store_colors (XigServerCodec *codec, XigStoreColors *message)
1967
 
{
1968
 
}
1969
 
 
1970
 
static void 
1971
 
xig_remote_client_store_named_color (XigServerCodec *codec, XigStoreNamedColor *message)
1972
 
{
1973
 
}
1974
 
 
1975
 
static void 
1976
 
xig_remote_client_query_colors (XigServerCodec *codec, XigQueryColors *message)
 
1970
xig_remote_client_free_colors (XigCodec *codec, XigFreeColors *message)
 
1971
{
 
1972
}
 
1973
 
 
1974
static void 
 
1975
xig_remote_client_store_colors (XigCodec *codec, XigStoreColors *message)
 
1976
{
 
1977
}
 
1978
 
 
1979
static void 
 
1980
xig_remote_client_store_named_color (XigCodec *codec, XigStoreNamedColor *message)
 
1981
{
 
1982
}
 
1983
 
 
1984
static void 
 
1985
xig_remote_client_query_colors (XigCodec *codec, XigQueryColors *message)
1977
1986
{
1978
1987
    XigQueryColorsReply reply;
1979
1988
 
1981
1990
    reply.colors_length = 0; // FIXME
1982
1991
    reply.colors = NULL; // FIXME
1983
1992
 
1984
 
    xig_server_codec_send_query_colors_reply (codec, &reply);
 
1993
    xig_codec_feed_query_colors_reply (XIG_CODEC (codec), &reply);
1985
1994
  
1986
1995
    g_free (reply.colors);
1987
1996
}
1988
1997
 
1989
1998
static void 
1990
 
xig_remote_client_lookup_color (XigServerCodec *codec, XigLookupColor *message)
 
1999
xig_remote_client_lookup_color (XigCodec *codec, XigLookupColor *message)
1991
2000
{
1992
2001
    XigLookupColorReply reply;
1993
2002
 
1999
2008
    reply.visual_green = 0; // FIXME
2000
2009
    reply.visual_blue = 0; // FIXME
2001
2010
 
2002
 
    xig_server_codec_send_lookup_color_reply (codec, &reply);
2003
 
}
2004
 
 
2005
 
static void 
2006
 
xig_remote_client_create_cursor (XigServerCodec *codec, XigCreateCursor *message)
2007
 
{
2008
 
}
2009
 
 
2010
 
static void 
2011
 
xig_remote_client_create_glyph_cursor (XigServerCodec *codec, XigCreateGlyphCursor *message)
2012
 
{
2013
 
}
2014
 
 
2015
 
static void 
2016
 
xig_remote_client_free_cursor (XigServerCodec *codec, XigFreeCursor *message)
2017
 
{
2018
 
}
2019
 
 
2020
 
static void 
2021
 
xig_remote_client_recolor_cursor (XigServerCodec *codec, XigRecolorCursor *message)
2022
 
{
2023
 
}
2024
 
 
2025
 
static void 
2026
 
xig_remote_client_query_best_size (XigServerCodec *codec, XigQueryBestSize *message)
 
2011
    xig_codec_feed_lookup_color_reply (XIG_CODEC (codec), &reply);
 
2012
}
 
2013
 
 
2014
static void 
 
2015
xig_remote_client_create_cursor (XigCodec *codec, XigCreateCursor *message)
 
2016
{
 
2017
}
 
2018
 
 
2019
static void 
 
2020
xig_remote_client_create_glyph_cursor (XigCodec *codec, XigCreateGlyphCursor *message)
 
2021
{
 
2022
}
 
2023
 
 
2024
static void 
 
2025
xig_remote_client_free_cursor (XigCodec *codec, XigFreeCursor *message)
 
2026
{
 
2027
}
 
2028
 
 
2029
static void 
 
2030
xig_remote_client_recolor_cursor (XigCodec *codec, XigRecolorCursor *message)
 
2031
{
 
2032
}
 
2033
 
 
2034
static void 
 
2035
xig_remote_client_query_best_size (XigCodec *codec, XigQueryBestSize *message)
2027
2036
{
2028
2037
    XigQueryBestSizeReply reply;
2029
2038
 
2031
2040
    reply.width = message->width;
2032
2041
    reply.height = message->height;
2033
2042
 
2034
 
    xig_server_codec_send_query_best_size_reply (codec, &reply);
 
2043
    xig_codec_feed_query_best_size_reply (XIG_CODEC (codec), &reply);
2035
2044
}
2036
2045
 
2037
2046
static void 
2038
 
xig_remote_client_query_extension (XigServerCodec *codec, XigQueryExtension *message)
 
2047
xig_remote_client_query_extension (XigCodec *codec, XigQueryExtension *message)
2039
2048
{
2040
2049
    XigQueryExtensionReply reply;
2041
2050
 
2045
2054
    reply.first_error = 0;
2046
2055
 
2047
2056
    if (strcmp (message->name, "BIG-REQUESTS") == 0)
2048
 
        reply.major_opcode = XIG_REQUEST_BIG_REQUESTS;
 
2057
        reply.major_opcode = XIG_REQUEST_BIGREQ;
2049
2058
    else if (strcmp (message->name, "SYNC") == 0)
2050
2059
        reply.major_opcode = XIG_REQUEST_SYNC;
2051
2060
    else if (strcmp (message->name, "RANDR") == 0)
2075
2084
 
2076
2085
    reply.present = reply.major_opcode != 0;
2077
2086
 
2078
 
    xig_server_codec_send_query_extension_reply (codec, &reply);
 
2087
    xig_codec_feed_query_extension_reply (XIG_CODEC (codec), &reply);
2079
2088
}
2080
2089
 
2081
2090
static void 
2082
 
xig_remote_client_list_extensions (XigServerCodec *codec, XigListExtensions *message)
 
2091
xig_remote_client_list_extensions (XigCodec *codec, XigListExtensions *message)
2083
2092
{
2084
2093
    XigListExtensionsReply reply;
2085
2094
 
2086
2095
    reply.sequence_number = message->sequence_number;
2087
2096
    reply.names = g_strsplit ("", " ", -1);
2088
 
    reply.names_length = g_strv_length (reply.names);
2089
2097
 
2090
 
    xig_server_codec_send_list_extensions_reply (codec, &reply);
 
2098
    xig_codec_feed_list_extensions_reply (XIG_CODEC (codec), &reply);
2091
2099
 
2092
2100
    g_strfreev (reply.names);
2093
2101
}
2094
2102
 
2095
2103
static void 
2096
 
xig_remote_client_change_keyboard_mapping (XigServerCodec *codec, XigChangeKeyboardMapping *message)
 
2104
xig_remote_client_change_keyboard_mapping (XigCodec *codec, XigChangeKeyboardMapping *message)
2097
2105
{
2098
2106
}
2099
2107
 
2100
2108
static void 
2101
 
xig_remote_client_get_keyboard_mapping (XigServerCodec *codec, XigGetKeyboardMapping *message)
 
2109
xig_remote_client_get_keyboard_mapping (XigCodec *codec, XigGetKeyboardMapping *message)
2102
2110
{
2103
2111
    XigGetKeyboardMappingReply reply;
2104
2112
    int i, j;
2113
2121
        for (j = 0; j < reply.keysyms_per_keycode; j++)
2114
2122
            reply.keysyms[i * reply.keysyms_per_keycode + j] = 0;
2115
2123
 
2116
 
    xig_server_codec_send_get_keyboard_mapping_reply (codec, &reply);
 
2124
    xig_codec_feed_get_keyboard_mapping_reply (XIG_CODEC (codec), &reply);
2117
2125
 
2118
2126
    g_free (reply.keysyms);
2119
2127
}
2120
2128
 
2121
2129
static void
2122
 
xig_remote_client_change_keyboard_control (XigServerCodec *codec, XigChangeKeyboardControl *message)
 
2130
xig_remote_client_change_keyboard_control (XigCodec *codec, XigChangeKeyboardControl *message)
2123
2131
{
2124
2132
}
2125
2133
 
2126
2134
static void
2127
 
xig_remote_client_get_keyboard_control (XigServerCodec *codec, XigGetKeyboardControl *message)
 
2135
xig_remote_client_get_keyboard_control (XigCodec *codec, XigGetKeyboardControl *message)
2128
2136
{
2129
2137
    XigGetKeyboardControlReply reply;
2130
2138
    int i;
2139
2147
    for (i = 0; i < 32; i++)
2140
2148
        reply.auto_repeats[i] = 0;
2141
2149
 
2142
 
    xig_server_codec_send_get_keyboard_control_reply (codec, &reply);
2143
 
}
2144
 
 
2145
 
 
2146
 
static void 
2147
 
xig_remote_client_bell (XigServerCodec *codec, XigBell *message)
2148
 
{
2149
 
}
2150
 
 
2151
 
static void 
2152
 
xig_remote_client_change_pointer_control (XigServerCodec *codec, XigChangePointerControl *message)
2153
 
{
2154
 
}
2155
 
 
2156
 
static void 
2157
 
xig_remote_client_get_pointer_control (XigServerCodec *codec, XigGetPointerControl *message)
 
2150
    xig_codec_feed_get_keyboard_control_reply (XIG_CODEC (codec), &reply);
 
2151
}
 
2152
 
 
2153
 
 
2154
static void 
 
2155
xig_remote_client_bell (XigCodec *codec, XigBell *message)
 
2156
{
 
2157
}
 
2158
 
 
2159
static void 
 
2160
xig_remote_client_change_pointer_control (XigCodec *codec, XigChangePointerControl *message)
 
2161
{
 
2162
}
 
2163
 
 
2164
static void 
 
2165
xig_remote_client_get_pointer_control (XigCodec *codec, XigGetPointerControl *message)
2158
2166
{
2159
2167
    XigGetPointerControlReply reply;
2160
2168
  
2161
2169
    reply.sequence_number = message->sequence_number;
2162
2170
 
2163
 
    xig_server_codec_send_get_pointer_control_reply (codec, &reply);
 
2171
    xig_codec_feed_get_pointer_control_reply (XIG_CODEC (codec), &reply);
2164
2172
}
2165
2173
 
2166
2174
static void 
2167
 
xig_remote_client_set_screen_saver (XigServerCodec *codec, XigSetScreenSaver *message)
 
2175
xig_remote_client_set_screen_saver (XigCodec *codec, XigSetScreenSaver *message)
2168
2176
{
2169
2177
}
2170
2178
 
2171
2179
static void 
2172
 
xig_remote_client_get_screen_saver (XigServerCodec *codec, XigGetScreenSaver *message)
 
2180
xig_remote_client_get_screen_saver (XigCodec *codec, XigGetScreenSaver *message)
2173
2181
{
2174
2182
    XigGetScreenSaverReply reply;
2175
2183
 
2179
2187
    reply.prefer_blanking = FALSE; // FIXME
2180
2188
    reply.allow_exposures = FALSE; // FIXME
2181
2189
 
2182
 
    xig_server_codec_send_get_screen_saver_reply (codec, &reply);
 
2190
    xig_codec_feed_get_screen_saver_reply (XIG_CODEC (codec), &reply);
2183
2191
}
2184
2192
 
2185
2193
static void
2186
 
xig_remote_client_change_hosts (XigServerCodec *codec, XigChangeHosts *message)
 
2194
xig_remote_client_change_hosts (XigCodec *codec, XigChangeHosts *message)
2187
2195
{
2188
2196
}
2189
2197
 
2190
2198
static void
2191
 
xig_remote_client_list_hosts (XigServerCodec *codec, XigListHosts *message)
 
2199
xig_remote_client_list_hosts (XigCodec *codec, XigListHosts *message)
2192
2200
{
2193
2201
    XigListHostsReply reply;
2194
2202
  
2197
2205
    reply.hosts_length = 0;
2198
2206
    reply.hosts = NULL;
2199
2207
 
2200
 
    xig_server_codec_send_list_hosts_reply (codec, &reply);
 
2208
    xig_codec_feed_list_hosts_reply (XIG_CODEC (codec), &reply);
2201
2209
 
2202
2210
    g_free (reply.hosts);
2203
2211
}
2204
2212
 
2205
2213
static void
2206
 
xig_remote_client_set_access_control (XigServerCodec *codec, XigSetAccessControl *message)
 
2214
xig_remote_client_set_access_control (XigCodec *codec, XigSetAccessControl *message)
2207
2215
{
2208
2216
}
2209
2217
 
2210
2218
static void 
2211
 
xig_remote_client_set_close_down_mode (XigServerCodec *codec, XigSetCloseDownMode *message)
 
2219
xig_remote_client_set_close_down_mode (XigCodec *codec, XigSetCloseDownMode *message)
2212
2220
{
2213
2221
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
2214
2222
    client->priv->close_down_mode = message->mode;
2215
2223
}
2216
2224
 
2217
2225
static void 
2218
 
xig_remote_client_kill_client (XigServerCodec *codec, XigKillClient *message)
2219
 
{
2220
 
}
2221
 
 
2222
 
static void 
2223
 
xig_remote_client_rotate_properties (XigServerCodec *codec, XigRotateProperties *message)
2224
 
{
2225
 
}
2226
 
 
2227
 
static void 
2228
 
xig_remote_client_force_screen_saver (XigServerCodec *codec, XigForceScreenSaver *message)
 
2226
xig_remote_client_kill_client (XigCodec *codec, XigKillClient *message)
 
2227
{
 
2228
}
 
2229
 
 
2230
static void 
 
2231
xig_remote_client_rotate_properties (XigCodec *codec, XigRotateProperties *message)
 
2232
{
 
2233
}
 
2234
 
 
2235
static void 
 
2236
xig_remote_client_force_screen_saver (XigCodec *codec, XigForceScreenSaver *message)
2229
2237
{
2230
2238
}
2231
2239
 
2232
2240
static void
2233
 
xig_remote_client_set_pointer_mapping (XigServerCodec *codec, XigSetPointerMapping *message)
 
2241
xig_remote_client_set_pointer_mapping (XigCodec *codec, XigSetPointerMapping *message)
2234
2242
{
2235
2243
    XigSetPointerMappingReply reply;
2236
2244
 
2237
2245
    reply.sequence_number = message->sequence_number;
2238
2246
    reply.status = 0; // FIXME
2239
2247
 
2240
 
    xig_server_codec_send_set_pointer_mapping_reply (codec, &reply);
 
2248
    xig_codec_feed_set_pointer_mapping_reply (XIG_CODEC (codec), &reply);
2241
2249
}
2242
2250
 
2243
2251
static void
2244
 
xig_remote_client_get_pointer_mapping (XigServerCodec *codec, XigGetPointerMapping *message)
 
2252
xig_remote_client_get_pointer_mapping (XigCodec *codec, XigGetPointerMapping *message)
2245
2253
{
2246
2254
    XigGetPointerMappingReply reply;
2247
2255
 
2248
2256
    reply.sequence_number = message->sequence_number;
2249
2257
 
2250
 
    xig_server_codec_send_get_pointer_mapping_reply (codec, &reply);
 
2258
    xig_codec_feed_get_pointer_mapping_reply (XIG_CODEC (codec), &reply);
2251
2259
}
2252
2260
 
2253
2261
static void
2254
 
xig_remote_client_set_modifier_mapping (XigServerCodec *codec, XigSetModifierMapping *message)
 
2262
xig_remote_client_set_modifier_mapping (XigCodec *codec, XigSetModifierMapping *message)
2255
2263
{
2256
2264
    XigSetModifierMappingReply reply;
2257
2265
 
2258
2266
    reply.sequence_number = message->sequence_number;
2259
2267
    reply.status = 0; // FIXME
2260
2268
 
2261
 
    xig_server_codec_send_set_modifier_mapping_reply (codec, &reply);
 
2269
    xig_codec_feed_set_modifier_mapping_reply (XIG_CODEC (codec), &reply);
2262
2270
}
2263
2271
 
2264
2272
static void
2265
 
xig_remote_client_get_modifier_mapping (XigServerCodec *codec, XigGetModifierMapping *message)
 
2273
xig_remote_client_get_modifier_mapping (XigCodec *codec, XigGetModifierMapping *message)
2266
2274
{
2267
2275
    XigGetModifierMappingReply reply;
2268
2276
    int i, j;
2275
2283
        for (j = 0; j < reply.keycodes_per_modifier; j++)
2276
2284
            reply.keycodes[i * reply.keycodes_per_modifier + j] = 0;
2277
2285
 
2278
 
    xig_server_codec_send_get_modifier_mapping_reply (codec, &reply);
 
2286
    xig_codec_feed_get_modifier_mapping_reply (XIG_CODEC (codec), &reply);
2279
2287
 
2280
2288
    g_free (reply.keycodes);
2281
2289
}
2282
2290
 
2283
2291
static void
2284
 
xig_remote_client_no_operation (XigServerCodec *codec, XigNoOperation *message)
 
2292
xig_remote_client_no_operation (XigCodec *codec, XigNoOperation *message)
2285
2293
{
2286
2294
}
2287
2295
 
2288
2296
static void 
2289
 
xig_remote_client_big_req_enable (XigServerCodec *codec, XigBigReqEnable *message)
 
2297
xig_remote_client_BIGREQ_enable (XigCodec *codec, XigBIGREQEnable *message)
2290
2298
{
2291
 
    XigBigReqEnableReply reply;
 
2299
    XigBIGREQEnableReply reply;
2292
2300
 
2293
 
    xig_server_codec_set_big_req_enabled (codec, TRUE);
 
2301
    xig_server_codec_set_BIGREQ_enabled (XIG_SERVER_CODEC (codec), TRUE);
2294
2302
 
2295
2303
    reply.sequence_number = message->sequence_number;
2296
2304
    reply.maximum_request_length = MAXIMUM_REQUEST_LENGTH;
2297
2305
 
2298
 
    xig_server_codec_send_big_req_enable_reply (codec, &reply);
 
2306
    xig_codec_feed_BIGREQ_enable_reply (XIG_CODEC (codec), &reply);
2299
2307
}
2300
2308
 
2301
2309
static void
2302
 
xig_remote_client_sync_initialize (XigServerCodec *codec, XigSYNCInitialize *message)
 
2310
xig_remote_client_SYNC_initialize (XigCodec *codec, XigSYNCInitialize *message)
2303
2311
{
2304
2312
    XigSYNCInitializeReply reply;
2305
2313
 
2307
2315
    reply.major_version = message->desired_major_version;
2308
2316
    reply.minor_version = message->desired_minor_version;
2309
2317
  
2310
 
    xig_server_codec_send_sync_initialize_reply (codec, &reply);
 
2318
    xig_codec_feed_SYNC_initialize_reply (XIG_CODEC (codec), &reply);
2311
2319
}
2312
2320
 
2313
2321
static void
2314
 
xig_remote_client_randr_query_version (XigServerCodec *codec, XigRANDRQueryVersion *message)
 
2322
xig_remote_client_RANDR_query_version (XigCodec *codec, XigRANDRQueryVersion *message)
2315
2323
{
2316
2324
    XigRANDRQueryVersionReply reply;
2317
2325
 
2319
2327
    reply.major_version = message->major_version;
2320
2328
    reply.minor_version = message->minor_version;
2321
2329
 
2322
 
    xig_server_codec_send_randr_query_version_reply (codec, &reply);
 
2330
    xig_codec_feed_RANDR_query_version_reply (XIG_CODEC (codec), &reply);
2323
2331
}
2324
2332
 
2325
2333
static void 
2326
 
xig_remote_client_xinerama_is_active (XigServerCodec *codec, XigXINERAMAIsActive *message)
 
2334
xig_remote_client_XINERAMA_is_active (XigCodec *codec, XigXINERAMAIsActive *message)
2327
2335
{
2328
2336
    XigXINERAMAIsActiveReply reply;
2329
2337
 
2330
2338
    reply.sequence_number = message->sequence_number;
2331
2339
    reply.is_active = FALSE;
2332
2340
 
2333
 
    xig_server_codec_send_xinerama_is_active_reply (codec, &reply);
 
2341
    xig_codec_feed_XINERAMA_is_active_reply (XIG_CODEC (codec), &reply);
2334
2342
}
2335
2343
 
2336
2344
static void 
2337
 
xig_remote_client_xinerama_query_screens (XigServerCodec *codec, XigXINERAMAQueryScreens *message)
 
2345
xig_remote_client_XINERAMA_query_screens (XigCodec *codec, XigXINERAMAQueryScreens *message)
2338
2346
{
2339
2347
    XigRemoteClient *client = XIG_REMOTE_CLIENT (codec);
2340
2348
    XigXINERAMAQueryScreensReply reply;
2350
2358
    reply.info[0].width = xig_screen_get_width_in_pixels (screen);
2351
2359
    reply.info[0].height = xig_screen_get_height_in_pixels (screen);
2352
2360
 
2353
 
    xig_server_codec_send_xinerama_query_screens_reply (codec, &reply);
 
2361
    xig_codec_feed_XINERAMA_query_screens_reply (XIG_CODEC (codec), &reply);
2354
2362
  
2355
2363
    g_free (reply.info);
2356
2364
}
2357
2365
 
2358
2366
static void
2359
 
xig_remote_client_xkb_use_extension (XigServerCodec *codec, XigXKBUseExtension *message)
 
2367
xig_remote_client_XKB_use_extension (XigCodec *codec, XigXKBUseExtension *message)
2360
2368
{
2361
2369
    XigXKBUseExtensionReply reply;
2362
2370
 
2365
2373
    reply.server_major = message->wanted_major; // FIXME
2366
2374
    reply.server_minor = message->wanted_minor; // FIXME
2367
2375
 
2368
 
    xig_server_codec_send_xkb_use_extension_reply (codec, &reply);
 
2376
    xig_codec_feed_XKB_use_extension_reply (XIG_CODEC (codec), &reply);
2369
2377
}
2370
2378
 
2371
2379
static void
2372
 
xig_remote_client_xkb_select_events (XigServerCodec *codec, XigXKBSelectEvents *message)
 
2380
xig_remote_client_XKB_select_events (XigCodec *codec, XigXKBSelectEvents *message)
2373
2381
{
2374
2382
}
2375
2383
 
2376
2384
static void
2377
 
xig_remote_client_xkb_get_state (XigServerCodec *codec, XigXKBGetState *message)
 
2385
xig_remote_client_XKB_get_state (XigCodec *codec, XigXKBGetState *message)
2378
2386
{
2379
2387
    XigXKBGetStateReply reply;
2380
2388
 
2395
2403
    reply.compat_lookup_mods = 0; // FIXME
2396
2404
    reply.ptr_btn_state = 0; // FIXME
2397
2405
 
2398
 
    xig_server_codec_send_xkb_get_state_reply (codec, &reply);
 
2406
    xig_codec_feed_XKB_get_state_reply (XIG_CODEC (codec), &reply);
2399
2407
}
2400
2408
 
2401
2409
static void
2402
 
xig_remote_client_xkb_set_controls (XigServerCodec *codec, XigXKBSetControls *message)
 
2410
xig_remote_client_XKB_set_controls (XigCodec *codec, XigXKBSetControls *message)
2403
2411
{
2404
2412
}
2405
2413
 
2406
2414
static void
2407
 
xig_remote_client_xkb_get_map (XigServerCodec *codec, XigXKBGetMap *message)
 
2415
xig_remote_client_XKB_get_map (XigCodec *codec, XigXKBGetMap *message)
2408
2416
{
2409
2417
    XigXKBGetMapReply reply;
2410
2418
 
2411
2419
    reply.sequence_number = message->sequence_number;
2412
2420
    reply.device_id = 0; // FIXME
2413
2421
 
2414
 
    xig_server_codec_send_xkb_get_map_reply (codec, &reply);
 
2422
    xig_codec_feed_XKB_get_map_reply (XIG_CODEC (codec), &reply);
2415
2423
}
2416
2424
 
2417
2425
static void
2418
 
xig_remote_client_xkb_get_names (XigServerCodec *codec, XigXKBGetNames *message)
 
2426
xig_remote_client_XKB_get_names (XigCodec *codec, XigXKBGetNames *message)
2419
2427
{
2420
2428
    XigXKBGetNamesReply reply;
2421
2429
 
2422
2430
    reply.sequence_number = message->sequence_number;
2423
2431
    reply.device_id = 0;
2424
2432
 
2425
 
    xig_server_codec_send_xkb_get_names_reply (codec, &reply);
 
2433
    xig_codec_feed_XKB_get_names_reply (XIG_CODEC (codec), &reply);
2426
2434
}
2427
2435
 
2428
2436
static void
2429
 
xig_remote_client_xkb_per_client_flags (XigServerCodec *codec, XigXKBPerClientFlags *message)
 
2437
xig_remote_client_XKB_per_client_flags (XigCodec *codec, XigXKBPerClientFlags *message)
2430
2438
{
2431
2439
    XigXKBPerClientFlagsReply reply;
2432
2440
 
2437
2445
    reply.auto_ctrls = 0x00000000; // FIXME
2438
2446
    reply.auto_ctrls_values = 0x00000000; // FIXME
2439
2447
 
2440
 
    xig_server_codec_send_xkb_per_client_flags_reply (codec, &reply);
 
2448
    xig_codec_feed_XKB_per_client_flags_reply (XIG_CODEC (codec), &reply);
2441
2449
}
2442
2450
 
2443
2451
static void 
2444
 
xig_remote_client_render_query_version (XigServerCodec *codec, XigRENDERQueryVersion *message)
 
2452
xig_remote_client_RENDER_query_version (XigCodec *codec, XigRENDERQueryVersion *message)
2445
2453
{
2446
2454
    XigRENDERQueryVersionReply reply;
2447
2455
  
2449
2457
    reply.major_version = 1;
2450
2458
    reply.minor_version = 0;
2451
2459
 
2452
 
    xig_server_codec_send_render_query_version_reply (codec, &reply);
 
2460
    xig_codec_feed_RENDER_query_version_reply (XIG_CODEC (codec), &reply);
2453
2461
}
2454
2462
 
2455
2463
static void 
2456
 
xig_remote_client_render_query_pict_formats (XigServerCodec *codec, XigRENDERQueryPictFormats *message)
 
2464
xig_remote_client_RENDER_query_pict_formats (XigCodec *codec, XigRENDERQueryPictFormats *message)
2457
2465
{
2458
2466
    XigRENDERQueryPictFormatsReply reply;
2459
2467
  
2460
2468
    reply.sequence_number = message->sequence_number;
2461
2469
    // FIXME
2462
2470
 
2463
 
    xig_server_codec_send_render_query_pict_formats_reply (codec, &reply);
 
2471
    xig_codec_feed_RENDER_query_pict_formats_reply (XIG_CODEC (codec), &reply);
2464
2472
}
2465
2473
 
2466
2474
XigRemoteClient *
2502
2510
    g_object_unref (client->priv->socket);
2503
2511
    g_io_channel_unref (client->priv->channel);
2504
2512
    g_hash_table_unref (client->priv->window_events);
 
2513
 
 
2514
    G_OBJECT_CLASS (xig_remote_client_parent_class)->finalize (object);
2505
2515
}
2506
2516
 
2507
2517
static void
2508
2518
xig_remote_client_class_init (XigRemoteClientClass *klass)
2509
2519
{
2510
2520
    GObjectClass *object_class = G_OBJECT_CLASS (klass);
2511
 
    XigServerCodecClass *codec_class = XIG_SERVER_CODEC_CLASS (klass);
 
2521
    XigCodecClass *codec_class = XIG_CODEC_CLASS (klass);
2512
2522
 
2513
2523
    object_class->finalize = xig_remote_client_finalize;
2514
2524
 
2636
2646
    codec_class->set_modifier_mapping = xig_remote_client_set_modifier_mapping;
2637
2647
    codec_class->get_modifier_mapping = xig_remote_client_get_modifier_mapping;
2638
2648
    codec_class->no_operation = xig_remote_client_no_operation;
2639
 
    codec_class->big_req_enable = xig_remote_client_big_req_enable;
2640
 
    codec_class->sync_initialize = xig_remote_client_sync_initialize;
2641
 
    codec_class->randr_query_version = xig_remote_client_randr_query_version;
2642
 
    codec_class->xinerama_is_active = xig_remote_client_xinerama_is_active;
2643
 
    codec_class->xinerama_query_screens = xig_remote_client_xinerama_query_screens;
2644
 
    codec_class->xkb_use_extension = xig_remote_client_xkb_use_extension;
2645
 
    codec_class->xkb_select_events = xig_remote_client_xkb_select_events;
2646
 
    codec_class->xkb_get_state = xig_remote_client_xkb_get_state;
2647
 
    codec_class->xkb_set_controls = xig_remote_client_xkb_set_controls;
2648
 
    codec_class->xkb_get_map = xig_remote_client_xkb_get_map;
2649
 
    codec_class->xkb_get_names = xig_remote_client_xkb_get_names;
2650
 
    codec_class->xkb_per_client_flags = xig_remote_client_xkb_per_client_flags;
2651
 
    codec_class->render_query_version = xig_remote_client_render_query_version;
2652
 
    codec_class->render_query_pict_formats = xig_remote_client_render_query_pict_formats;
 
2649
    codec_class->BIGREQ_enable = xig_remote_client_BIGREQ_enable;
 
2650
    codec_class->SYNC_initialize = xig_remote_client_SYNC_initialize;
 
2651
    codec_class->RANDR_query_version = xig_remote_client_RANDR_query_version;
 
2652
    codec_class->XINERAMA_is_active = xig_remote_client_XINERAMA_is_active;
 
2653
    codec_class->XINERAMA_query_screens = xig_remote_client_XINERAMA_query_screens;
 
2654
    codec_class->XKB_use_extension = xig_remote_client_XKB_use_extension;
 
2655
    codec_class->XKB_select_events = xig_remote_client_XKB_select_events;
 
2656
    codec_class->XKB_get_state = xig_remote_client_XKB_get_state;
 
2657
    codec_class->XKB_set_controls = xig_remote_client_XKB_set_controls;
 
2658
    codec_class->XKB_get_map = xig_remote_client_XKB_get_map;
 
2659
    codec_class->XKB_get_names = xig_remote_client_XKB_get_names;
 
2660
    codec_class->XKB_per_client_flags = xig_remote_client_XKB_per_client_flags;
 
2661
    codec_class->RENDER_query_version = xig_remote_client_RENDER_query_version;
 
2662
    codec_class->RENDER_query_pict_formats = xig_remote_client_RENDER_query_pict_formats;
2653
2663
 
2654
2664
    signals[DISCONNECTED] =
2655
2665
        g_signal_new ("disconnected",